我目前正在从展望API移动到微软图形API,当我尝试订阅像我一样的Outlook来推送通知的日历和事件,我得到一个错误:微软图形API提供了InternalServerError上订阅请求
{
"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"
}
}
}
为了认证本人使用终点:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
当我发送一个请求到:
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"
}
我发现了几个例相同的错误,但他们在不同的区域(未订阅)是完全。这里有什么可能是错的? 我试图遵循这个问题:"Resource not found for the segment" using Graph subscription beta,但是,解决方案不适用于我的情况。
您是否尝试过忽略您在负载中设置为空的所有字段?所以基本上只发送'resource','notificationUrl','changeType'和'expirationDateTime'? –
谢谢!这有助于“资源”:“我/日历/ {calendarId} /事件”,但是当我尝试订阅日历中的更改(日历添加/删除/更新)时,仍然有相同的问题和相同的消息。 我试过资源:我/日历和我/事件。根据该文件它应该工作: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/subscription_post_subscriptions – dvelopp
你可以更新你的问题与问题请求? –