sensitivityLabel: evaluateRemoval

Namespace: microsoft.graph.security

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Indicate to the consuming application what actions it should take to remove the label information.

Given contentInfo as an input, which includes existing content metadata key-value pairs, the API returns an informationProtectionAction that contains some combination of one or more of the following:

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) InformationProtectionPolicy.Read Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application InformationProtectionPolicy.Read.All Not available.

HTTP request

To evaluate removal as the signed-in user (delegated permission) or a specified user (application permission):

POST /users/{usersId}/security/informationProtection/sensitivityLabels/evaluateRemoval
POST /users/me/security/informationProtection/sensitivityLabels/evaluateRemoval

To evaluate removal as a service principal (application permission):

POST /users/security/informationProtection/sensitivityLabels/evaluateRemoval

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-type application/json. Required.
User-Agent Describes the name and version of the calling application. Details will surface in Azure Information Protection Analytics. Suggested format is ApplicationName/Version. Optional.

Request body

In the request body, supply a JSON representation of the parameters.

The following table shows the parameters that can be used with this action.

Parameter Type Description
contentInfo contentInfo Provides details about the content format, content state, and existing metadata as key-value pairs.
downgradeJustification downgradeJustification Justification that must be provided by the user or application logic.

Response

If successful, this action returns a 200 OK response code and an informationProtectionAction collection in the response body. The informationProtectionAction object will contain a metadataAction object that informs the application which metadata to remove.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/users/bob@contoso.com/security/informationProtection/sensitivityLabels/evaluateRemoval
Content-type: application/json
User-agent: ContosoLOBApp/1.0

{
    "contentInfo": {
        "@odata.type": "#microsoft.graph.security.contentInfo",
        "identifier": null,
        "state": "rest",
        "metadata": [
            {
                "name": "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_Enabled",
                "value": "True"
            },
            {
                "name": "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_Method",
                "value": "Standard"
            },
            {
                "name": "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_SetDate",
                "value": "1/1/0001 12:00:00 AM"
            },
            {
                "@odata.type": "#microsoft.graph.security.keyValuePair",
                "name": "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_SiteId",
                "value": "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c"
            },
            {
                "@odata.type": "#microsoft.graph.security.keyValuePair",
                "name": "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_Name",
                "value": "LabelScopedToBob_Tests"
            },
            {
                "@odata.type": "#microsoft.graph.security.keyValuePair",
                "name": "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_ContentBits",
                "value": "0"
            },
            {
                "@odata.type": "#microsoft.graph.security.keyValuePair",
                "name": "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_ActionId",
                "value": "00000000-0000-0000-0000-000000000000"
            }
        ]
    },
    "downgradeJustification": {
        "justificationMessage": "The information has been declassified.",
        "isDowngradeJustified": true
    }
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.security.informationProtectionAction)",
    "value": [
        {
            "@odata.type": "#microsoft.graph.security.metadataAction",
            "metadataToRemove": [
                "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_Enabled",
                "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_Method",
                "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_SetDate",
                "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_SiteId",
                "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_Name",
                "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_ContentBits",
                "MSIP_Label_836ff34f-b604-4a62-a68c-d6be4205d569_ActionId"
            ],
            "metadataToAdd": []
        }
    ]
}