Search code examples
javaoffice365microsoft-graph-apioffice365apimicrosoft-exchange

Microsoft Graph returns 403 Forbidden on a second attempt to create a subscribtion


I did manage to subscribe to Microsoft Graph push notifications for one time for the following resources:

  • me/calendars;
  • me/calendars/{id}/events

However, when I try to do the same now, I get:

403 Forbidden https://graph.microsoft.com/v1.0/subscriptions

{
  "error": {
    "code": "ExtensionError",
    "message": "Operation: Create; Exception: [Status Code: Forbidden; Reason: Forbidden]",
    "innerError": {
      "request-id": "7afa93f6-f616-4ea7-9bbe-c977ffd1e239",
      "date": "2017-07-14T16:23:35"
    }
  }
}

My request looks as follows:

{
  "resource": "me/calendars/{ID}/events",
  "notificationUrl": "https://myapp/MyService/notifications/",
  "clientState": null,
  "changeType": "created,updated,deleted",
  "expirationDateTime": "2017-07-17T14:53:33Z"
}

Docs that I use: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/webhooks

I suspect Microsoft Graph to give such an error because of the fact that there is a currently working subscription after me first time subscribing. However, when I worked with outlook API, I could get as many subscriptions as I wanted to.

The question is, does Graph API support multiple subscriptions for one resource and if yes, what can be the cause of the 403 Forbidden in such a case?


Solution

  • yes, Microsoft graph supports multiple subscription for one resource. We investigated this request. Exchange is denying the access. Please make sure you are using right credentials. Please reactive this issue if necessary. Thank you.