Microsoft Graph API Shared Calendar IDs inconsistent between users

后端 未结 2 1993
闹比i
闹比i 2021-01-20 11:11

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.Read

相关标签:
2条回答
  • 2021-01-20 11:26

    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.

    0 讨论(0)
  • 2021-01-20 11:45

    I use for this a calendar of an account with given privilegies to other people. So I can access to this cal from each account with

    /{$user}/calendar/{$cal}/
    

    Also I can Sync with delta:

    /{$user}/calendarView/delta?
    

    But this works only for "one" calendar, at this moment there is no "delta" for an explizit calendar.

    0 讨论(0)
提交回复
热议问题