Microsoft Graph API 共享日历 ID 在用户之间不一致 [英] Microsoft Graph API Shared Calendar IDs inconsistent between users

查看:19
本文介绍了Microsoft Graph API 共享日历 ID 在用户之间不一致的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

My application allows users to schedule events on shared calendars and allows other users to potentially reschedule or cancel those events. I ask for the Calendar.ReadWrite.Shared permission to enable this.

It appears that if two users have access to a shared calendar, the ID value returned from the GET /me/calendars is different for the two users. Is there a consistent, unique ID value that can be used to correlate shared calendars across users?

解决方案

Unfortunately there is not a unique ID value that is shared across all of the shared calendar instances.

Calendars in Exchange server are built on top of mail folders (just like appointments are built on top of messages). Each folder in a user's mailbox has an ID assigned when it's created.

When a user shares their calendar with another user (the delegate), what happens behind the scenes is that when the delegate clicks the "Accept" button in the sharing mail, the server creates a copy of the shared calendar in the delegate's mailbox, and sets up syncing so that the copy stays in sync with the original. This is important to your question, because when you access the shared calendar as the delegate, you're not accessing the calendar in the owner's mailbox, you're accessing the copy. Because a copy is created in each delegate's mailbox, the ID is different for each copy.

The owner property on the calendar resource tells you which mailbox the original calendar lives in, but it isn't enough to correlate it with other copies in other mailboxes. The name property is editable, so it can't be relied on here.

这篇关于Microsoft Graph API 共享日历 ID 在用户之间不一致的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆