3
votes

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?

2
Hi @Emily! I'm running into the same issue for a similar use case. Did you find a suitable workaround? Thanks!Alexander Soto

2 Answers

3
votes

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
votes

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.