日历事件的Microsoft图订阅钩子被多次疯狂触发

问题描述 投票:0回答:1

为日历中的监听事件更新创建的订阅被多次触发。即使只有一个订阅注册了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"
        }
    }
}
microsoft-graph microsoft-graph-calendar
1个回答
0
投票

是否有可能在开发流程中对同一资源创建了多个订阅? (例如,启动和停止调试)。

无论如何,对于特定的更改,不能保证更改通知仅发送一次,订户应始终使用通知ID,资源ID或两者的组合对接收到的通知进行重复数据删除。

最后,事件支持增量,但requires providing a start and end date

© www.soinside.com 2019 - 2024. All rights reserved.