问题
I was trying to set up a subscription to the notifications of one of my calendars, but am getting the following error:
{
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: NotFound; Reason: Not Found]",
"innerError": {
"request-id": "XXXXXXXXXXX",
"date": "2018-07-13T13:32:37"
}
}
}
I believe the request is correct:
{
"changeType": "created,updated,deleted",
"notificationUrl": "https://(...)/outlook/notifications",
"resource": "me/calendars/{calendar_id}/events",
"expirationDateTime":"2018-07-16T10:00:00.000Z",
"clientState": "OutlookIntegration"
}
Any hint on what may be happening? Thanks in advance.
回答1:
You can't use /me with an application token.
Graph doesn't know what "me" is unless there is user info in the token.
You'll have to specify the user's object id or user principal name instead of "me". Like: users/object-id-here
.
来源:https://stackoverflow.com/questions/51326521/microsoft-graph-error-when-subscribing-to-calendar-notifications