Microsoft Graph allows users to create subscriptions on target resources to receive notifications about changes to the subscribed resources. Recently, we launched a feature to create rich notifications for Microsoft Teams by setting the includeResourceData value to `true` in the subscription’s creation API payload. For details, see the subscription reference documentation.
With the introduction of the includeResourceData value, we are retiring the includeProperties property currently on the Microsoft Graph beta endpoint as of January 1, 2021. If your Microsoft Teams app currently uses the includeProperties resource, please update it immediately to use includeResourceData to ensure your code still works.
The following example shows how to create change notification subscriptions using includeResourceData:
POST https://graph.microsoft.com/beta/subscriptions
Content-type: application/json { Â Â "resource":"teams/getAllMessages", Â Â "changeType":"created,updated", Â Â "clientState":"ClientSecret", Â Â "notificationUrl":"https://webhookappexample.azurewebsites.net/api/notifications", Â Â "expirationDateTime":"2020-11-01T18:00:36.9592725+00:00", Â Â "includeResourceData":true, Â Â "encryptionCertificate":"MIIDQjCCAiqgAwIBAgIQRql6VVODTX2XXXXXXXXXXXXXXXXX", Â Â "encryptionCertificateId":"4ca5c96d4713489baf1166b7d26a8de9" }
Happy coding!
The Microsoft Graph Team