我们正在使用多租户应用程序。我们创建了一个订阅来收听特定用户的日历事件,但我们没有收到通知。
用户接受以下范围:Calendars.Read Calendars.ReadWrite Calendars.Read.Shared Calendars.ReadWrite.Shared offline_access User.Read.All
当我们调用 POST https://graph.microsoft.com/v1.0/subscriptions
BODY 时:
{
"resource": "/users/31c61efc-bc28-4552-9f0d-1a8735767c4e/calendars/AAMkAGRjZjY3OGRmLWU3MjAtNGExYy1hOTk0LTNkNjExOWVhZmYyNQBGAAAAAAD3yBF0B84VRJLe9CCZ4-ajBwDf5J1F10FqQ6VkC14neUWZAAAAAAEGAADf5J1F10FqQ6VkC14neUWZAABEL_2XAAA\u003d/events",
"changeType": "created,updated,deleted",
"clientState": "XXXXXX",
"notificationUrl": "https://XXXXX.ngrok.io/notification/event",
"expirationDateTime": "2019-05-31T14:42:08.651Z"
}
然后调用 notificationUrl 并且我们收到验证令牌:
Validation: Testing client application reachability for subscription Request-Id: 9d020355-7589-4485-ba29-62d1ec899723
但是当我们登录31c61efc-bc28-4552-9f0d-1a8735767c4e
帐户并更新或创建事件时,不会发送任何通知。
如果我们调用 GET https://graph.microsoft.com/v1.0/subscriptions
,则创建订阅:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions",
"value": [
{
"id": "b92d909e-b1b5-49b8-af54-74b7956d6565",
"resource": "/users/31c61efc-bc28-4552-9f0d-1a8735767c4e/calendars/AAMkAGRjZjY3OGRmLWU3MjAtNGExYy1hOTk0LTNkNjExOWVhZmYyNQBGAAAAAAD3yBF0B84VRJLe9CCZ4-ajBwDf5J1F10FqQ6VkC14neUWZAAAAAAEGAADf5J1F10FqQ6VkC14neUWZAABEL_2XAAA=/events",
"applicationId": "XXXX",
"changeType": "created,updated,deleted",
"clientState": null,
"notificationUrl": "https://XXXX.ngrok.io/notification/event",
"expirationDateTime": "2019-05-31T14:42:08.651Z",
"creatorId": "31c61efc-bc28-4552-9f0d-1a8735767c4e"
}
]
}
监控 ngrok 调用,没有对通知事件端点的调用失败。
是否有任何控制台日志我们可以验证以了解问题可能是什么?
我们尝试为不同的帐户创建订阅,但没有成功。我们也尝试订阅/me/events