1
votes

I am getting this error while working on MS graph create subscription for Microsoft Teams.

Here is my request example POST https://graph.microsoft.com/beta/subscriptions

Request body { "changeType": "created,updated", "notificationUrl": "{notificationUrl}", "lifecycleNotificationUrl": "{lifenotificationUrl}", "resource": "/chats/{id}/messages", "includeResourceData": true, "encryptionCertificate": "{base64exncrytionsertificate}", "encryptionCertificateId": "{customID}", "expirationDateTime": "2020-02-28T04:00:00.0000000Z", "clientState": "{Notifications}" }

1

1 Answers

0
votes

Check your access to the Graph API. That may be available on the app registration you use to get access with. It seems like when creating a subscription, you need to have access to the resource you ask notifications for. You can check those by using www.jwt.io, that can show you the claims your access token contains. If the resource needs access that needs to be granted by an admin, that consent may be given by an admin on your Azure AD.