How to specify correct payload for the microsoft.graph.security evaluateClassificationResults api?

Heorhi Maniya 0 Reputation points
2023-11-30T15:27:10.3333333+00:00

Greetings,

I'm trying to call evaluateClassificationResults api from the microsoft.graph.security MS Graph Beta.

According to the documentation we need to specify body for the request with the:

  1. Data we want to evaluate (contentInfo)
  2. Based on which criteria it should be evaluated (classificationResults)
{
    "contentInfo": {
        "@odata.type": "#microsoft.graph.security.contentInfo",
        "format@odata.type": "#microsoft.graph.security.contentFormat",
        "format": "default",
        "contentFormat": "File",
        "identifier": "c:\\user\\new.docx",
        "state@odata.type": "#microsoft.graph.security.contentState",
        "state": "rest",
        "metadata": []
    },
    "classificationResults": [
        {
            "sensitiveTypeId": "50842eb7-edc8-4019-85dd-5a5c1f2bb085", //Credit Card 
            "count": 7,
            "confidenceLevel": 99
        }
    ]
}

As per second object (classificationResults) AFAIU we should have sensitivityTypeId from the Microsoft Purview configuration. However I'm still in confusion what should be specified in the contentInfo object as the identifier? For example what should I specify if I'm trying to evaluate an email or the file located at SharePoint?

Will appreciate any suggestion or examples of how this API should be called

Thank you

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,389 questions
0 comments No comments
{count} votes