Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
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.
Process a batch of content entries asynchronously against data protection policies.
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) | Content.Process.All | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Content.Process.All | Not available. |
HTTP request
POST /security/dataSecurityAndGovernance/processContentAsync
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-Type | application/json. Required. |
Request body
In the request body, provide a JSON object with the following parameters.
Parameter | Type | Description |
---|---|---|
processContentRequests | processContentBatchRequest collection | Required. A collection of individual content processing requests, each with its own user context, content, and request ID. |
The request body is limited to 2 MB in size. The maximum number of content entries per request is 64. These could be spread across up to 64 processContentRequests, each containing one content entry or 2 processContentRequests, each containing 32 content entries or some other combination that does not exceed 64 content entries.
Response
In most cases, when successful, this method returns a 204, No Content. This method can also return a 200 OK
response code and a collection of processContentResponses objects in the response body. Each object in the collection corresponds to one of the request items in the batch, identified by the requestId
, and contains the results (policy actions, errors, scope state) for that specific item. Given that this is an asynchronous intent API from the perspective of the caller submitting the batch, the 200 OK
indicates the batch was accepted; the results within the response body reflect the outcome of each item's processing by the service.
Example
Request
The following example shows a batch request with two items.
POST https://graph.microsoft.com/beta/security/dataSecurityAndGovernance/processContentAsync
Content-type: application/json
{
"processContentRequests": [
{
"requestId": "bca22a4e-245f-4b6f-a242-9bdbc238e413",
"userId": "47b5e19a-e210-4ed5-a643-dbf5b47e1821",
"contentToProcess": {
"contentEntries": [
{
"@odata.type": "#microsoft.graph.processConversationMetadata",
"identifier": "47138e53-c855-47f0-9271-d473681ac310",
"content": {
"@odata.type": "#microsoft.graph.textContent",
"data": "1309475745, Is D3m0P@sswd! a secure password?"
},
"name": "Chat message",
"correlationId": "e76bcc34-07ea-43f4-ae64-d383df423b90",
"sequenceNumber": 0,
"createdDateTime": "2025-04-21T16:00:00Z",
"modifiedDateTime": "2025-04-21T16:00:00Z"
}
],
"activityMetadata": {
"activity": "uploadText",
},
"deviceMetadata": {
"operatingSystemSpecifications": {
"operatingSystemPlatform": "Windows",
"operatingSystemVersion": "10.0.19045"
},
"ipAddress": "127.0.0.1"
},
"protectedAppMetadata": {
"name": "PC Purview Workload",
"version": "0.2",
"applicationLocation":{
"@odata.type": "microsoft.graph.policyLocationApplication",
"value": "be121c8f-ecd8-4026-b699-669e0ce1bcbf"
}
},
"integratedAppMetadata": {
"name": "PCA Workload Sample - IA",
"version": "1.0"
}
}
},
{
"requestId": "f1df4929-4116-4ee6-b008-0a6a42037aed",
"userId": "47b5e19a-e210-4ed5-a643-dbf5b47e1821",
"contentToProcess": {
"contentEntries": [
{
"@odata.type": "#microsoft.graph.processConversationMetadata",
"identifier": "02be9bc1-335c-4184-ae4c-247449e5e85d",
"content": {
"@odata.type": "#microsoft.graph.textContent",
"data": "1309475746, The password D3m0P@sswd! has a mix of uppercase and lowercase letters, numbers, and special characters, which are good practices for creating a strong password. However, its length and the use of common patterns like 'Demo' and 'Password' can make it less secure than it appears."
},
"name": "Chat message",
"correlationId": "e76bcc34-07ea-43f4-ae64-d383df423b90",
"sequenceNumber": 1,
"createdDateTime": "2025-04-21T16:00:00Z",
"modifiedDateTime": "2025-04-21T16:00:00Z"
}
],
"activityMetadata": {
"activity": "downloadText",
},
"deviceMetadata": {
"operatingSystemSpecifications": {
"operatingSystemPlatform": "Windows",
"operatingSystemVersion": "10.0.19045"
},
"ipAddress": "127.0.0.1"
},
"protectedAppMetadata": {
"name": "PC Purview Workload",
"version": "0.2",
"applicationLocation":{
"@odata.type": "microsoft.graph.policyLocationApplication",
"value": "be19dc8f-ecd8-4026-b699-669e0ce1bcbf"
}
},
"integratedAppMetadata": {
"name": "PCA Workload Sample - IA",
"version": "1.0"
}
}
}
]
}
Response
The following example shows the 204 No Content response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 204 No Content