I'm currently moving from Outlook API to Microsoft Graph API and when I try to subscribe to push notifications for calendars and events as I did for Outlook and I get an error:
{
"error": {
"code": "InternalServerError",
"message": "Object reference not set to an instance of an object.",
"innerError": {
"request-id": "130ef895-4741-472e-9155-73fcb38a487f",
"date": "2017-07-14T11:40:11"
}
}
}
To authenticate I use end-point:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
When I send a request to:
https://graph.microsoft.com/v1.0/subscriptions
{
"id": null,
"resource": "users/me/events/calendars/{calendarId}/events",
"notificationUrl": "https://myapp:8080/MyService/notifications/",
"clientState": null,
"@odata.type": null,
"@odata.id": null,
"@odata.context": null,
"changeType": "created,updated,deleted",
"expirationDateTime": "2017-07-19T11:40:10Z"
}
I found several cases with the same error, but they were totally in a different area(not subscriptions). What can be wrong here? I tried to follow this question: "Resource not found for the segment" using Graph subscription beta , However, the solution doesn't work in my case.
resource
,notificationUrl
,changeType
, andexpirationDateTime
? – Jason Johnston