1

I successfully created a subscription to a message event, but it is never firing. Can someone help point me to any useful debugging tools that I may be missing? Here is my debugging progress so far...

Did the subscription get created?

I believe so. I created it using:

POST https://graph.microsoft.com/v1.0/subscriptions/
{
   "changeType": "created,updated",
   "notificationUrl": "https://glitch-subdomain.glitch.me/callback-that-just-logs-stuff",
   "resource": "mailFolders('inbox')/messages",
   "expirationDateTime":"2019-12-05T18:23:45.9356913Z",
   "clientState": "secretClientValue"
}
  • The endpoint returns 201 Created.
  • The validation webhook fires. I respond as per the docs, enabling the subscription to be set up.
  • I verify it was created by calling GET /subscriptions and see it there

Did the proper event occur?

Based on this post I searched directly for the message that should have fired the event:

GET https://graph.microsoft.com/v1.0/users/myemail@live.com/mailFolders('inbox')/messages

It is there.

Does my callback URL actually work?

curl -XPOST https://glitch-subdomain.glitch.me/callback-that-just-logs-stuff

Yep.

Does it work using the graph explorer?

YES! But why not in my app? I suspect it is something with the app configuration but there is no ouput, no log messages I can find, no webhook log I can find.

To further debug, I requested the https://graph.microsoft.com/v1.0/me endpoint using the auth token from the MS Graph API and my application token. Maybe I was operating on some other account? They were identical.

More context...

My app (and the Graph Explorer) requests the Mail.Read and User.Read permissions. I have gone through no special verification process. And (to make matters worse) it was working previously. But even after rolling back to the point when it was working, still the same.

Any tips would be much appreciated

1 Answers1

2

There is currently an issue affecting the Microsoft Graph subscription. This is being reported by users here , unfortunately, no response from Microsoft yet.

Dulaj Kulathunga
  • 1,248
  • 2
  • 9
  • 19