-1

I used to received the notification after receiving a new mail after making a subscription. However, since I accidently spammed my own mail box (create an event that make it so that each time there is a new message, a new draft message was created (and draft message count as new message), each time I create a subscription, I got the answer that everything is fine, but no new subscription is created. What should I do to have a functionnal subscription ?

Annex:

the post call which ask to call a ws each times a new message is received https://graph.microsoft.com/post/subscriptions with those params

{ 
  changeType: 'created',
  notificationUrl: 'the adresse of the webservice',
  resource: 'me/messages',
  expirationDateTime: '2018-10-23T17:46:08Z',
  clientState: 'Message Created' 
}

the answer (I also got a log indicating that the webservice got the notification token and answer it with a plain/text with statut 200 message containing the notification token.

{ 
  changeType: 'created',
  notificationUrl: 'the adresse of the webservice',
  resource: 'me/messages',
  expirationDateTime: '2018-10-22T17:37:21Z',
  clientState: 'Message Created' 
}
Ant
  • 277
  • 3
  • 10

1 Answers1

1

A few things to check:

  1. The results returned by the list subscriptions API varies depending on the permissions (the linked article explains that). Make sure that when you check for the existence of the sub, you have the right permissions for the subscription you are looking for. Best, test with the same app and identity.
  2. You mentioned you did receive a notification from the subscription? If so, the notification contains the ID of the subscription that generated it. That in itself is proof that the subscription was indeed created. Are you able to do a GET on that subscription?
Peter Ciszewski
  • 609
  • 3
  • 6