为在日历中侦听事件更新而创建的订阅被多次触发。即使只有一个为 url 注册的订阅。
用于订阅的 api 是POST https://graph.microsoft.com/v1.0/subscriptions
身体有效载荷如下:-
{
"changeType": "updated",
"notificationUrl": "https://*******.ngrok.io/v1/microsoft/notify_me",
"resource": "me/events",
"expirationDateTime":"2020-05-30T22:23:45.9356913Z",
"clientState": "secretClientValue",
"latestSupportedTlsVersion": "v1_2"
}
成功注册后,钩子被多次疯狂调用,我必须确保它被调用一次,因为我必须执行关键的数据库操作。
我究竟做错了什么?为什么钩子被多次调用?
我也尝试了 delta 函数,但它没有工作并引发以下错误。
{
"error": {
"code": "BadRequest",
"message": "Unsupported request: Change tracking is not supported against 'microsoft.graph.event'.",
"innerError": {
"request-id": "bb74dcd2-2890-41f6-a88c-2cc4b2e06078",
"date": "2020-06-01T06:36:14"
}
}
}