You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: concepts/change-notifications-with-resource-data.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Rich notifications include the following resource data in the payload:
33
33
34
34
## Creating a subscription
35
35
36
-
Rich notifications are set up in the same way as [basic change notifications](/graph/api/subscription-post-subscriptions), except you **must** specify the following additional properties:
36
+
Rich notifications are set up in the same way as [basic change notifications](/graph/api/subscription-post-subscriptions), except you **must** specify the following properties:
37
37
38
38
-**includeResourceData** which should be set to `true` to explicitly request resource data.
39
39
-**encryptionCertificate** which contains only the public key that Microsoft Graph uses to encrypt the resource data it returns to your app. For security, Microsoft Graph encrypts the resource data returned in a rich notification. You must provide a public encryption key as part of creating the subscription. For more information on creating and managing encryption keys, see [Decrypting resource data from change notifications](#decrypting-resource-data-from-change-notifications).
@@ -108,7 +108,7 @@ In this section, you explore the following validation concepts:
108
108
109
109
### Validation tokens in the change notification
110
110
111
-
A change notification with resource data contains an additional property, **validationTokens**, which contains an array of [JSON Web Tokens](https://datatracker.ietf.org/doc/html/rfc7519) (JWT) generated by Microsoft Graph. Microsoft Graph generates a single token for each distinct app and tenant pair for whom there's an item in the **value** array. Keep in mind that change notifications might contain a mix of items for various apps and tenants that subscribed using the same **notificationUrl**.
111
+
A change notification with resource data contains an extra property, **validationTokens**, which contains an array of [JSON Web Tokens](https://datatracker.ietf.org/doc/html/rfc7519) (JWT) generated by Microsoft Graph. Microsoft Graph generates a single token for each distinct app and tenant pair for whom there's an item in the **value** array. Keep in mind that change notifications might contain a mix of items for various apps and tenants that subscribed using the same **notificationUrl**.
112
112
113
113
> [!NOTE]
114
114
> Microsoft Graph doesn't send validation tokens for [change notifications delivered through Azure Event Hubs](change-notifications-delivery.md) because the subscription service doesn't need to validate the **notificationUrl** for Event Hubs.
@@ -154,11 +154,11 @@ In particular, perform validation on every JWT token in the **validationTokens**
154
154
155
155
Use the following steps to validate tokens and apps that generate tokens:
156
156
157
-
1. Validate that the token hasn't expired.
157
+
1. Validate that the token isn't expired.
158
158
159
-
2. Validate the token hasn't been tampered with and was issued by the expected authority, Microsoft identity platform:
159
+
2. Validate that the Microsoft identity platform issued the token and that the token isn't tampered with.
160
160
161
-
- Obtain the signing keys from the common configuration endpoint: `https://login.microsoftonline.com/common/.well-known/openid-configuration`. This configuration is cached by your app for some time. The configuration is updated frequently as signing keys are rotated daily.
161
+
- Obtain the signing keys from the common configuration endpoint: `https://login.microsoftonline.com/common/.well-known/openid-configuration`. Your app can cache this configuration for some time. The configuration is updated frequently as signing keys are rotated daily.
162
162
- Verify the signature of the JWT token using those keys.
163
163
164
164
Don't accept tokens issued by any other authority.
@@ -171,8 +171,8 @@ Use the following steps to validate tokens and apps that generate tokens:
171
171
172
172
4.**Critical**: Validate that the app that generated the token represents the Microsoft Graph change notification publisher.
173
173
174
-
- Check that the **azp** property in the token matches the expected value of `0bf30f3b-4a52-48df-9a82-234910c4a086`.
175
-
- This ensures that change notifications aren't sent by a different app that isn't Microsoft Graph.
174
+
- Check that the `azp` property in the token matches the expected value of `0bf30f3b-4a52-48df-9a82-234910c4a086`.
175
+
- This check ensures that a different app that isn't Microsoft Graph did not send the change notifications.
For the Java sample to work, you'll also need to implement the `JwkKeyResolver`.
263
+
For the Java sample to work, you also need to implement the `JwkKeyResolver`.
264
264
265
265
```java
266
266
packagecom.example.restservice;
@@ -336,7 +336,7 @@ export function isTokenValid(token, appId, tenantId) {
336
336
337
337
## Decrypting resource data from change notifications
338
338
339
-
The **resourceData** property of a change notification includes only the basic ID and type information of a resource instance. The **encryptedData** property contains the full resource data, encrypted by Microsoft Graph using the public key provided in the subscription. The property also contains values required for verification and decryption. This is done to increase the security of customer data accessed via change notifications. It is your responsibility to secure the private key to ensure that a third party can't decrypt the customer data, even if they manage to intercept the original change notifications.
339
+
The **resourceData** property of a change notification includes only the basic ID and type information of a resource instance. The **encryptedData** property contains the full resource data, encrypted by Microsoft Graph using the public key provided in the subscription. The property also contains values required for verification and decryption. This encryption is done to increase the security of customer data accessed via change notifications. It is your responsibility to secure the private key to ensure that a third party can't decrypt the customer data, even if they manage to intercept the original change notifications.
340
340
341
341
In this section, you learn the following concepts:
342
342
@@ -402,7 +402,7 @@ To decrypt resource data, your app should perform the reverse steps, using the p
402
402
403
403
1. Use the symmetric key to calculate the HMAC-SHA256 signature of the value in **data**.
404
404
405
-
Compare it to the value in **dataSignature**. If they don't match, assume the payload has been tampered with and don't decrypt it.
405
+
Compare it to the value in **dataSignature**. If they don't match, assume the payload is tampered with and don't decrypt it.
406
406
407
407
1. Use the symmetric key with an Advanced Encryption Standard (AES) (such as the .NET [Aes](/dotnet/api/system.security.cryptography.aes?view=netframework-4.8&preserve-view=true)) to decrypt the content in **data**.
408
408
@@ -416,7 +416,7 @@ To decrypt resource data, your app should perform the reverse steps, using the p
416
416
417
417
### Example: decrypting a notification with encrypted resource data
418
418
419
-
The following JSON example shows a change notification that includes encrypted property values of a **chatMessage** instance in a channel message. The instance is specified by the `@odata.id` value.
419
+
The following JSON example shows a change notification that includes encrypted property values of a **chatMessage** instance in a channel message. The `@odata.id` value specifies the instance.
Copy file name to clipboardExpand all lines: concepts/connecting-external-content-deploy-teams.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Ensure that the **webApplicationInfo** property is added to the manifest. After
45
45
46
46
## Update Microsoft Graph permissions
47
47
48
-
In the [Microsoft Entra admin center](https://entra.microsoft.com) > expand the **Identity** menu > select **Applications** > **App registrations** > select your app registration > select **API permissions** > select **Add a permission** > select **Microsoft Graph**. Select the `ExternalConnection.ReadWrite.OwnedBy` and `ExternalItem.ReadWrite.OwnedBy` Microsoft Graph permissions as shown in the following example.
48
+
In the [Microsoft Entra admin center](https://entra.microsoft.com), expand the **Identity** menu > select **Applications** > **App registrations** > select your app registration > select **API permissions** > select **Add a permission** > select **Microsoft Graph**. Select the `ExternalConnection.ReadWrite.OwnedBy` and `ExternalItem.ReadWrite.OwnedBy` Microsoft Graph permissions as shown in the following example.
49
49
50
50

51
51
@@ -89,7 +89,7 @@ Keep the following tips in mind:
89
89
- You can ignore `subscriptionExpirationDateTime` and `subscriptionId`.
90
90
- The change notification is for Microsoft Graph connector management only when the `@odata.type` of the resource data matches the one in the sample payload.
91
91
- The `tenantId` identified is the customer's tenant ID. When calling the Microsoft Graph API to [manage Microsoft Graph connections](connecting-external-content-manage-connections.md), you must generate the app token on behalf of this customer's tenant ID.
92
-
- You can call the Microsoft Graph API to get the customer's display name and default domain name. This can help you map the `tenantId` to the unique identifier in your system. To learn more, see [find tenant information by tenant ID](/graph/api/tenantrelationship-findtenantinformationbytenantid).
92
+
- You can call the Microsoft Graph API to get the customer's display name and default domain name. This step can help you map the `tenantId` to the unique identifier in your system. To learn more, see [find tenant information by tenant ID](/graph/api/tenantrelationship-findtenantinformationbytenantid).
93
93
- Within `resourceData`, use `state` to determine whether to create or delete connections. You need the `connectorsTicket` to create the connections.
You need to send a `202 - Accepted` status code in your response to Microsoft Graph. If Microsoft Graph doesn't receive a 2xx class code, it tries to publish the change notification a number of times for about four hours. After that, the change notification is dropped and isn't delivered.
149
+
You need to send a `202 - Accepted` status code in your response to Microsoft Graph. If Microsoft Graph doesn't receive a 2xx class code, it tries to publish the change notification many times for about four hours. After that, the change notification is dropped and isn't delivered.
150
150
151
151
> [!NOTE]
152
152
> Send the `202 - Accepted` status code as soon as you receive the change notification, even before you validate its authenticity. You are acknowledging the receipt of the change notification and preventing unnecessary retries. The current timeout is 30 seconds, but it might be reduced in the future to optimize service performance. If the notification URL doesn't reply within 30 seconds for more than 10% of the requests from Microsoft Graph over a 10-minute period, all subsequent notifications will be delayed and retried for a period of 4 hours. If a notification URL doesn't reply within 30 seconds for more than 20% of the requests from Microsoft Graph over a 10-minute period, all subsequent notifications will be dropped.
153
153
154
154
To validate the authenticity of `validationToken`:
155
155
156
-
- Verify that the token hasn't expired.
157
-
- Verify that the token hasn't been tampered with and was issued by the Microsoft identity platform.
156
+
- Verify that the token isn't expired.
157
+
- Verify that the Microsoft identity platform issued the token and that the token isn't tampered with.
158
158
- Verify that the `azp` claim in the token is **0bf30f3b-4a52-48df-9a82-234910c4a086**.
159
159
- Verify the `aud` claim in the token is the same as the "{{Teams-appid}}" you specified.
160
160
@@ -275,7 +275,7 @@ In the Sample Prompts section, provide two sample prompts that Microsoft can use
275
275
276
276
### Connection Description
277
277
278
-
In Connection Description section, provide the `description` property for your custom Microsoft Graph connection. Microsoft will use this to ensure that your Microsoft Graph connection has a rich description for Copilot for Microsoft 365. This description is optional.
278
+
In Connection Description section, provide the `description` property for your custom Microsoft Graph connection. Microsoft uses this to ensure that your Microsoft Graph connection has a rich description for Copilot for Microsoft 365. This description is optional.
0 commit comments