2
votes

I subscribed to Outlook Push Notification Services, precisely I want to receive push notifications for sentitems.

Consequently, I use https://outlook.office.com/api/v2.0/me/MailFolders/sentitems/messages as Resource in my #Microsoft.OutlookServices.PushSubscription POST request to the url https://outlook.office.com/api/v2.0/me/subscription

As expected, I receive the push notification when I send an email. The problem lies in the fact that the ResourceData is always the same. The Id never changes and correspond to the one I received after the first Notification.

I also remarked that even when no mail is sent I keep receiving notification with "ChangeType":"Created" (and always the same ResourceData.Id).

This may be a bug, or should I send back something to the subscriptions after receiving a notification?

1

1 Answers

2
votes

This is because the webhook responded to the push notification request with status code 500. Hence Outlook Push Notification Services treated this request as failed and then retried it later for several times. As the notifications of the same subscription are processed in sequence, later notification won't be sent until the earlier notification was successfully sent out. That's why you saw multiple notifications with the same resource data and change type even when no change happened.