title | description | ms.localizationpriority | author | ms.subservice | doc_type |
---|---|---|---|---|---|
informationProtectionLabel: evaluateApplication (deprecated) |
Evaluate which label to apply based on existing content info and desired content state. Deprecated. |
medium |
tommoser |
security |
apiPageType |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
[!INCLUDE informationprotection-deprecate]
Compute the information protection label that should be applied and return the set of actions that must be taken to correctly label the information. This API is useful when a label should be set manually or explicitly by a user or service, rather than automatically based on file contents.
Given contentInfo, which includes existing content metadata key/value pairs, and labelingOptions as an input, the API returns an informationProtectionAction object that contains one of more of the following:
- addContentFooterAction
- addContentHeaderAction
- addWatermarkAction
- applyLabelAction
- customAction
- justifyAction
- metadataAction
- protectAdhocAction
- protectByTemplateAction
- protectionDoNotForwardAction
- recommendLabelAction
- removeContentFooterAction
- removeContentHeaderAction
- removeProtectionAction
- removeWatermarkAction
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
POST me/informationProtection/policy/labels/evaluateApplication
POST /users/{id}/informationProtection/policy/labels/evaluateApplication
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-type | application/json. Required. |
User-Agent | Describes the name of the calling application. Details will surface in Azure Information Protection Analytics. Suggested format is ApplicationName/Version. Optional. |
In the request body, provide a JSON object with the following parameters.
Parameter | Type | Description |
---|---|---|
contentInfo | contentInfo | Provides details on the content format, content state, and existing metadata as key/value pairs. |
labelingOptions | labelingOptions | Provides details about the desired state of the content. |
If successful, this method returns a 200 OK
response code and a new informationProtectionAction collection object in the response body.
The following example shows how to call this API.
The following example shows a request.
POST https://graph.microsoft.com/beta/informationProtection/policy/labels/evaluateApplication
Content-type: application/json
User-agent: ContosoLOBApp/1.0
{
"contentInfo": {
"@odata.type": "#microsoft.graph.contentInfo",
"format@odata.type": "#microsoft.graph.contentFormat",
"format": "default",
"identifier": null,
"state@odata.type": "#microsoft.graph.contentState",
"state": "rest",
"metadata@odata.type": "#Collection(microsoft.graph.keyValuePair)",
"metadata": [
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled",
"value": "True"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method",
"value": "Standard"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate",
"value": "1/1/0001 12:00:00 AM"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId",
"value": "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name",
"value": "General"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits",
"value": "0"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId",
"value": "00000000-0000-0000-0000-000000000000"
}
]
},
"labelingOptions": {
"@odata.type": "#microsoft.graph.labelingOptions",
"assignmentMethod@odata.type": "#microsoft.graph.assignmentMethod",
"assignmentMethod": "standard",
"labelId@odata.type": "#Guid",
"labelId": "97309856-9c28-4ac6-9382-5f8bc20c457b",
"downgradeJustification": null,
"extendedProperties@odata.type": "#Collection(microsoft.graph.keyValuePair)",
"extendedProperties": []
}
}
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
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.informationProtectionAction)",
"value": [
{
"@odata.type": "#microsoft.graph.protectByTemplateAction",
"templateId": "31f2f3ba-1a56-48b7-ad90-0edc774ccfa2"
},
{
"@odata.type": "#microsoft.graph.metadataAction",
"metadataToRemove": [
"MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled",
"MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method",
"MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate",
"MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId",
"MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name",
"MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits",
"MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId"
],
"metadataToAdd": [
{
"name": "MSIP_Label_97309856-9c28-4ac6-9382-5f8bc20c457b_Enabled",
"value": "true"
},
{
"name": "MSIP_Label_97309856-9c28-4ac6-9382-5f8bc20c457b_SetDate",
"value": "2019-10-03T21:40:02Z"
},
{
"name": "MSIP_Label_97309856-9c28-4ac6-9382-5f8bc20c457b_Method",
"value": "Standard"
},
{
"name": "MSIP_Label_97309856-9c28-4ac6-9382-5f8bc20c457b_Name",
"value": "Inspire Demo"
},
{
"name": "MSIP_Label_97309856-9c28-4ac6-9382-5f8bc20c457b_SiteId",
"value": "cb46c030-1825-4e81-a295-151c039dbf02"
},
{
"name": "MSIP_Label_97309856-9c28-4ac6-9382-5f8bc20c457b_ActionId",
"value": "987357d3-6512-46b5-b20e-000065400015"
},
{
"name": "MSIP_Label_97309856-9c28-4ac6-9382-5f8bc20c457b_ContentBits",
"value": "8"
}
]
}
]
}