【问题标题】:How to create a subscription to a user calendar using application permissions to get notifications of all shared,delegated calenders如何使用应用程序权限创建对用户日历的订阅以获取所有共享、委派日历的通知
【发布时间】:2019-10-08 13:05:09
【问题描述】:

如果我对用户日历中的事件Calendars.Read 应用程序权限,我如何使用图表创建对用户日历的订阅接口。

下面我尝试通过将资源参数更新为“users/user@mydomain.com/events”来为“user@mydomain.com”邮箱创建事件订阅,这是订阅获取共享、委派日历通知的正确方法用户?

{
   "changeType": "created,updated",
   "resource": "users/user@mydomain.com/events",
   "notificationUrl": "https://webhook.azurewebsites.net/api/send/myNotifyClient",   
   "expirationDateTime":"2016-11-20T18:23:45.9356913Z",
   "clientState": "secretClientValue"
}

【问题讨论】:

    标签: microsoft-graph-api microsoft-graph-calendar


    【解决方案1】:

    (澄清:我从未为此类资源创建通知)。

    你没有说明错误是什么。

    在您的资源字段中,它可能需要: /users/{userId}/events

    {userId} 不应是 UPN,而是用户的 UUID。

    {
       "changeType": "created,updated",
       "resource": "users/{userId}/events",
       "notificationUrl": "https://webhook.azurewebsites.net/api/send/myNotifyClient",   
       "expirationDateTime":"2016-11-20T18:23:45.9356913Z",
       "clientState": "secretClientValue"
    }
    

    【讨论】:

    • 是否保证通知用户日历中的任何更改(/users/{id}/calendars)?
    • 应该(除非文档另有说明)。但是,我在其他“图形 API”中遇到过这种情况,除非添加了特殊的未记录标志,否则它不会报告所有操作类型。但我从未使用过日历 API,所以可能没问题。我始终建议应用您感兴趣的所有操作并测试哪些有效,哪些无效。请记住,delta API 是一个“delta”(例如,如果您重命名一个文件 10 次,则可能只会显示最后一次重命名)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多