Microsoft Graph API 在订阅请求时给出 InternalServerError
Microsoft Graph API gives InternalServerError on subscribe request
我目前正在从 Outlook API 迁移到 Microsoft Graph API,当我尝试订阅日历和事件的推送通知,就像我为 Outlook 所做的那样,但我收到错误消息:
{
"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"
}
我发现有几个案例有同样的错误,但它们完全在不同的领域(不是订阅)。这里有什么问题?
我试图解决这个问题: ,但是,该解决方案不适用于我的情况。
删除负载中您设置为 null
的所有字段。像这样制作你的有效载荷:
{
"resource": "users/me/events/calendars/{calendarId}/events",
"notificationUrl": "https://myapp:8080/MyService/notifications/",
"changeType": "created,updated,deleted",
"expirationDateTime": "2017-07-19T11:40:10Z"
}
从你的 HTTP 响应中,你能给我 X-BEServer HTTP 响应 header 值以及这些空引用错误响应之一的请求 ID 和日期时间吗?这样我就可以提取日志并查看发生了什么。
我目前正在从 Outlook API 迁移到 Microsoft Graph API,当我尝试订阅日历和事件的推送通知,就像我为 Outlook 所做的那样,但我收到错误消息:
{
"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"
}
我发现有几个案例有同样的错误,但它们完全在不同的领域(不是订阅)。这里有什么问题?
我试图解决这个问题:
删除负载中您设置为 null
的所有字段。像这样制作你的有效载荷:
{
"resource": "users/me/events/calendars/{calendarId}/events",
"notificationUrl": "https://myapp:8080/MyService/notifications/",
"changeType": "created,updated,deleted",
"expirationDateTime": "2017-07-19T11:40:10Z"
}
从你的 HTTP 响应中,你能给我 X-BEServer HTTP 响应 header 值以及这些空引用错误响应之一的请求 ID 和日期时间吗?这样我就可以提取日志并查看发生了什么。