【问题标题】:How to subscribe calendar event if calendar is given delegated permission using ms-graph api如果使用 ms-graph api 授予日历委托权限,如何订阅日历事件
【发布时间】:2019-10-07 14:20:02
【问题描述】:

Outlook 事件的更改通知可以是created,通过使用 ms graph api 订阅以下方式。

{
   "changeType": "created,updated,deleted",
   "notificationUrl": "notificationUrl",
   "resource": "Users/xxx169f-xxx-xxxx-afd2-936c51e6xxxx/Events",
   "expirationDateTime":"2016-11-20T18:23:45.9356913Z",
   "clientState": "secretClientValue"
}  

但是对于已授予委派权限的日历,我如何以类似的方式获取通知?

【问题讨论】:

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


    【解决方案1】:

    您可以通过将其与 Calendar.Read.Shared 一起使用来验证您是否可以通过 API 访问共享日历 获取https://graph.microsoft.com/v1.0/users/adelev@m365x874506.onmicrosoft.com/events

    在此示例中,AdeleV 与 MeganB 共享了她的日历。我以 Megan B 的身份登录到 Graph Explorer。 https://developer.microsoft.com/en-us/graph/graph-explorer?request=users/adelev@m365x874506.onmicrosoft.com/events&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com

    很遗憾,您无法按照此文档页面 https://docs.microsoft.com/en-us/graph/outlook-get-shared-events-calendars?view=graph-rest-1.0 上的注释订阅事件

    注意共享权限(Calendars.Read.Shared 或 Calendars.ReadWrite.Shared)允许您在共享或委派日历中读取或写入事件。他们不支持订阅以更改此类文件夹中项目的通知。要为租户中的共享、委派或任何其他用户或资源日历中的事件设置更改通知订阅,请使用应用程序权限 Calendars.Read。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-31
      • 1970-01-01
      • 2019-05-22
      相关资源
      最近更新 更多