问题描述
环境
- Outlook桌面(Office 365);
- Exchange服务器;
- 天青云
初始条件
USER_A 是 USER_B 的助手,并管理 USER_B 的日历(Outlook共享日历)。我们想跟踪 USER_B 日历中的更改。在Outlook / Exchange中, USER_A 是 USER_B 的代表。
目标
修改某些Outlook日历项目后,我们想调用一个功能应用程序,它将更新数据库。日历可以是共享日历,但不一定是共享日历。
使用案例
USER_B 尚未登录,但是 USER_A 在 USER_B 的日历中创建约会。
即使未登录 USER_B ,我们仍要捕获 USER_A 所做的更改并更新我们的数据库。换句话说,即使共享日历的所有者未登录,更改通知也应针对该共享日历触发。
问题 Function App是否需要“ App”级别的权限才能做到这一点?
代码是否类似于:
POST https://graph.microsoft.com/v1.0/subscriptions
Content-type: application/json
{
"changeType": "created","notificationUrl": "https://webhook.azurewebsites.net/api/send/UpdateDataBase","resource": "users/{a-user-id}/events","expirationDateTime":"2020-10-20T19:23:45.9376913Z","clientState": "bigSecret","latestSupportedTlsversion": "v3"
}
解决方法
为了在共享日历中获取更改通知,需要“应用程序”级别的权限。
我在这里How to subscribe calendar event if calendar is given delegated permission using ms-graph api