Skip to content

Commit 900af30

Browse files
ReezaAli149CopilotDanipocketFaithOmbongi
authored
Added new example for AI Agents to PC; added more information to aiAgentInfo (#28623)
* Added new example for AI Agents to PC and added more information to aiAgentInfo * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Minor fix * Code review feedback applied. * Resolving code snippet error * Applying code snippet changes to v1 doc * Commented out broken code - temporary fix * Commenting out the snippet include files to keep the tab structure in the staged article * Remove code snippets for multiple languages Removed code snippet includes for various languages from the userdatasecurityandgovernance.processcontent documentation. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update userdatasecurityandgovernance-processcontent.md * Added Kyle's clarification to aiAgentInfo * Reverse incorrect changes made for policyActions * Apply suggestions from code review Co-authored-by: Reeza Ali <223746809+ReezaAli149@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Faith Moraa Ombongi <ombongi.moraa.fe@gmail.com> * Apply suggestions from code review Co-authored-by: Faith Moraa Ombongi <ombongi.moraa.fe@gmail.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Danipocket <88507770+Danipocket@users.noreply.github.com> Co-authored-by: Faith Moraa Ombongi <ombongi.moraa.fe@gmail.com>
1 parent afcaae0 commit 900af30

4 files changed

Lines changed: 209 additions & 165 deletions

File tree

api-reference/beta/api/userdatasecurityandgovernance-processcontent.md

Lines changed: 103 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: "userDataSecurityAndGovernance: processContent"
33
toc.title: "userDataSecurityAndGovernance: processContent"
44
description: "Process content against data protection policies in the context of the current, or specified, user."
5-
author: "kylemar"
6-
ms.date: 02/06/2026
5+
author: "reezaali149"
6+
ms.date: 04/22/2026
77
ms.localizationpriority: medium
88
ms.subservice: "security"
99
doc_type: apiPageType
@@ -71,12 +71,12 @@ If successful, this action returns a `200 OK` response code and a [processConte
7171

7272
## Examples
7373

74-
### Example 1: Enterprise AI app
74+
### Example 1: Enterprise app
7575

7676
#### Request
7777

78-
The following example shows a request.
79-
# [HTTP](#tab/http)
78+
The following example shows a request from an enterprise app, which might be a non-AI and AI app. The text that you send using `data` can be any text from your app. If your app is an AI app, you would send the user's prompt.
79+
8080
<!-- {
8181
"blockType": "request",
8282
"name": "userdatasecurityandgovernance.processcontent_1"
@@ -133,29 +133,99 @@ Client-Request-Id: 50dc805c-3af4-42d9-ad16-a746235cc736
133133
}
134134
```
135135

136-
# [C#](#tab/csharp)
137-
[!INCLUDE [sample-code](../includes/snippets/csharp/userdatasecurityandgovernanceprocesscontent-1-csharp-snippets.md)]
138-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
136+
---
137+
138+
#### Response
139139

140-
# [Go](#tab/go)
141-
[!INCLUDE [sample-code](../includes/snippets/go/userdatasecurityandgovernanceprocesscontent-1-go-snippets.md)]
142-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
140+
The following example shows the response.
141+
>**Note:** The response object shown here might be shortened for readability.
142+
<!-- {
143+
"blockType": "response",
144+
"truncated": true,
145+
"@odata.type": "microsoft.graph.processContentResponse"
146+
}
147+
-->
148+
```http
149+
HTTP/1.1 200 OK
150+
Content-Type: application/json
151+
Client-Request-Id: 50dc805c-3af4-42d9-ad16-a746235cc736
143152
144-
# [Java](#tab/java)
145-
[!INCLUDE [sample-code](../includes/snippets/java/userdatasecurityandgovernanceprocesscontent-1-java-snippets.md)]
146-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
153+
{
154+
"@odata.context": "https://graph.microsoft.com/beta/$metadata#microsoft.graph.processContentResponse",
155+
"protectionScopeState": "notModified",
156+
"policyActions": [],
157+
"processingErrors": []
158+
}
159+
```
147160

148-
# [JavaScript](#tab/javascript)
149-
[!INCLUDE [sample-code](../includes/snippets/javascript/userdatasecurityandgovernanceprocesscontent-1-javascript-snippets.md)]
150-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
161+
### Example 2: AI Agent
151162

152-
# [PHP](#tab/php)
153-
[!INCLUDE [sample-code](../includes/snippets/php/userdatasecurityandgovernanceprocesscontent-1-php-snippets.md)]
154-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
163+
#### Request
155164

156-
# [Python](#tab/python)
157-
[!INCLUDE [sample-code](../includes/snippets/python/userdatasecurityandgovernanceprocesscontent-1-python-snippets.md)]
158-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
165+
The following example shows a request sent from an AI agent. In the request, notice that there's an `agents` array which is of type `aiAgentInfo`. In this example, `data` is used to send the user's prompt.
166+
167+
<!-- {
168+
"blockType": "request",
169+
"name": "userdatasecurityandgovernance.processcontent_4"
170+
}
171+
-->
172+
```http
173+
POST https://graph.microsoft.com/beta/users/{5def8f26-aff8-4db6-a08c-0fcf8f1aa2ba}/dataSecurityAndGovernance/processContent
174+
Content-Type: application/json
175+
176+
{
177+
"contentToProcess": {
178+
"contentEntries": [
179+
{
180+
"@odata.type": "microsoft.graph.processConversationMetadata",
181+
"identifier": "42837765-85c9-4a28-a165-27b6aaa5f635",
182+
"content": {
183+
"@odata.type": "microsoft.graph.textContent",
184+
"data": "For application 123456789, Write an acceptance letter for Alex Wilber with Credit card number 0000111122223333, ssn: 000-11-2222 at One Microsoft Way, Redmond, WA 98052"
185+
},
186+
"agents": [
187+
{
188+
"@odata.type": "microsoft.graph.aiAgentInfo",
189+
"blueprintId": "c84571c6-5ef3-4af7-aed2-0491cfd362a0",
190+
"identifier": "89515a70-a236-43be-b977-3ff0b454f853",
191+
"name": "Demo Agent",
192+
"version": "1.0"
193+
}
194+
],
195+
"name":"PC Purview API Explorer message",
196+
"correlationId": "1cd5e33a-c78f-46e4-a242-74b0ef910486",
197+
"sequenceNumber": 0,
198+
             "isTruncated": false,
199+
             "createdDateTime": "2026-04-08T20:52:08",
200+
             "modifiedDateTime": "2026-04-08T20:52:08"
201+
          }
202+
       ],
203+
       "activityMetadata": { 
204+
          "activity": "uploadText"
205+
       },
206+
       "deviceMetadata": {
207+
          "operatingSystemSpecifications": {
208+
             "operatingSystemPlatform": "Windows 11",
209+
             "operatingSystemVersion": "10.0.26200.0" 
210+
          },
211+
          "ipAddress": "127.0.0.1"
212+
       },
213+
       "protectedAppMetadata": {
214+
          "name": "PC Purview API Explorer",
215+
          "version": "0.2",
216+
          "applicationLocation":{
217+
             "@odata.type": "microsoft.graph.policyLocationApplication",
218+
             "value": "83ef198a-0396-4893-9d4f-d36efbffc8bd"
219+
          }
220+
       },
221+
       "integratedAppMetadata": {
222+
          "name": "PC Purview API Explorer",
223+
          "version": "0.1" 
224+
       }
225+
    }
226+
}
227+
228+
```
159229

160230
---
161231

@@ -172,34 +242,34 @@ The following example shows the response.
172242
```http
173243
HTTP/1.1 200 OK
174244
Content-Type: application/json
175-
Client-Request-Id: 50dc805c-3af4-42d9-ad16-a746235cc736
176245
177246
{
178247
"@odata.context": "https://graph.microsoft.com/beta/$metadata#microsoft.graph.processContentResponse",
179-
"protectionScopeState": "notModified",
180-
"policyActions": [
248+
"protectionScopeState": "modified",
249+
"policyActions": [
181250
{
182-
"@odata.type": "#microsoft.graph.dlpAction",
183-
"action" : "restrictWebGrounding"
251+
"@odata.type": "#microsoft.graph.restrictAccessAction",
252+
"action": "restrictAccess",
253+
"restrictionAction": "block"
184254
}
185255
],
186256
"processingErrors": []
187257
}
188258
```
189259

190-
### Example 2: Network provider app
260+
### Example 3: Network provider app
191261

192262
#### Request
193263

194264
The following example shows a request.
195-
# [HTTP](#tab/http)
265+
196266
<!-- {
197267
"blockType": "request",
198268
"name": "userdatasecurityandgovernance.processcontent_2"
199269
}
200270
-->
201271
```http
202-
POST https://graph.microsoft.com/v1.0/users/{5def8f26-aff8-4db6-a08c-0fcf8f1aa2ba}/dataSecurityAndGovernance/processContent
272+
POST https://graph.microsoft.com/beta/users/{5def8f26-aff8-4db6-a08c-0fcf8f1aa2ba}/dataSecurityAndGovernance/processContent
203273
Content-Type: application/json
204274
205275
{
@@ -245,30 +315,6 @@ Content-Type: application/json
245315
246316
```
247317

248-
# [C#](#tab/csharp)
249-
[!INCLUDE [sample-code](../includes/snippets/csharp/userdatasecurityandgovernanceprocesscontent-2-csharp-snippets.md)]
250-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
251-
252-
# [Go](#tab/go)
253-
[!INCLUDE [sample-code](../includes/snippets/go/userdatasecurityandgovernanceprocesscontent-2-go-snippets.md)]
254-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
255-
256-
# [Java](#tab/java)
257-
[!INCLUDE [sample-code](../includes/snippets/java/userdatasecurityandgovernanceprocesscontent-2-java-snippets.md)]
258-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
259-
260-
# [JavaScript](#tab/javascript)
261-
[!INCLUDE [sample-code](../includes/snippets/javascript/userdatasecurityandgovernanceprocesscontent-2-javascript-snippets.md)]
262-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
263-
264-
# [PHP](#tab/php)
265-
[!INCLUDE [sample-code](../includes/snippets/php/userdatasecurityandgovernanceprocesscontent-2-php-snippets.md)]
266-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
267-
268-
# [Python](#tab/python)
269-
[!INCLUDE [sample-code](../includes/snippets/python/userdatasecurityandgovernanceprocesscontent-2-python-snippets.md)]
270-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
271-
272318
---
273319

274320
#### Response
@@ -299,12 +345,12 @@ Content-Type: application/json
299345
}
300346
```
301347

302-
### Example 3: Network provider app with file content
348+
### Example 4: Network provider app with file content
303349

304350
#### Request
305351

306352
The following example shows a request.
307-
# [HTTP](#tab/http)
353+
308354
<!-- {
309355
"blockType": "request",
310356
"name": "userdatasecurityandgovernance.processcontent_3"
@@ -365,30 +411,6 @@ Content-Type: application/json
365411
}
366412
```
367413

368-
# [C#](#tab/csharp)
369-
[!INCLUDE [sample-code](../includes/snippets/csharp/userdatasecurityandgovernanceprocesscontent-3-csharp-snippets.md)]
370-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
371-
372-
# [Go](#tab/go)
373-
[!INCLUDE [sample-code](../includes/snippets/go/userdatasecurityandgovernanceprocesscontent-3-go-snippets.md)]
374-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
375-
376-
# [Java](#tab/java)
377-
[!INCLUDE [sample-code](../includes/snippets/java/userdatasecurityandgovernanceprocesscontent-3-java-snippets.md)]
378-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
379-
380-
# [JavaScript](#tab/javascript)
381-
[!INCLUDE [sample-code](../includes/snippets/javascript/userdatasecurityandgovernanceprocesscontent-3-javascript-snippets.md)]
382-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
383-
384-
# [PHP](#tab/php)
385-
[!INCLUDE [sample-code](../includes/snippets/php/userdatasecurityandgovernanceprocesscontent-3-php-snippets.md)]
386-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
387-
388-
# [Python](#tab/python)
389-
[!INCLUDE [sample-code](../includes/snippets/python/userdatasecurityandgovernanceprocesscontent-3-python-snippets.md)]
390-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
391-
392414
---
393415

394416
#### Response

api-reference/beta/resources/aiagentinfo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Inherits from [aiInteractionEntity](../resources/aiinteractionentity.md).
2222

2323
| Property | Type | Description |
2424
| :---------- | :----- | :---------------------------------------------------------------------------------------------------------------- |
25-
| blueprintId | String | Identifier of the parent [agent blueprint](../resources/agentIdentityBlueprint.md) that defines the identity and configuration of the agent. |
26-
| identifier | String | The unique identifier of the AI agent. Inherited from [aiInteractionEntity](../resources/aiinteractionentity.md). |
25+
| blueprintId | String | Identifier of the parent [agent blueprint](../resources/agentidentityblueprint.md) that defines the identity and configuration of the agent. This identifier is provided by Microsoft Entra. |
26+
| identifier | String | The unique identifier of the AI agent. Inherited from [aiInteractionEntity](../resources/aiinteractionentity.md). This identifier is provided by the developer. If building on Microsoft Entra Agent ID, use the [agentIdentity](../resources/agentidentity.md) ID. |
2727
| name | String | The display name of the AI agent. Inherited from [aiInteractionEntity](../resources/aiinteractionentity.md). |
2828
| version | String | The version of the AI agent used. Inherited from [aiInteractionEntity](../resources/aiinteractionentity.md). |
2929

0 commit comments

Comments
 (0)