1

We are experiencing that ids of calendars created using MS Graph sometimes changes. The calendars are created using a POST request to /me/calendars, and the id of the returned calendar object is stored in our database so that we can synchronize with the calendar later. Unfortunately sometimes we see that the id of the calendar in the users Outlook account has changed later the same day. We are using the immutable id header in all requests.

It looks like this problem (or similar problems) has been reported multiple times on SO:

microsoft graph API /calendars id is not unique

Office 365 default Calendar's ID changes automatically

Why would a Calendar Id change when using the Outlook REST API?

but I can't see from the answers what the solution is, or if MS was able to fix a bug.

Any update on this issue would be appreciated.

jbiversen
  • 371
  • 3
  • 14
  • If i need to design the application, then i would not use ID - as it's bound to change when its moved between stores or if the calendar item is recreated. These IDs are meant for the internal usage of Exchange Server/Calendar, so i won't rely on it; so, i won't call it as bug, rather "its the design". In such scenario, i would create my own custom MAPI property/extended property or openextensionstype stamp with the object it and use it, till they exist in them. If you have a better solution, share it here - so that it can be useful to the community as well. – Dev Dec 18 '20 at 05:34
  • Does it helped? – Dev Dec 18 '20 at 19:48
  • As far as I can see using MS Graph to work with events in a calendar (https://learn.microsoft.com/en-us/graph/api/resources/calendar?view=graph-rest-1.0), is based on the calendar id, so I don't see how I can read the events in a calendar, or create an event in a calendar, without using the id of the calendar. – jbiversen Dec 19 '20 at 07:37

1 Answers1

0

When I encountered this problem, I solved it by using Microsoft 365 groups and their default calendars to ensure an immutable id that you can access from no matter what user and adding/removing members to manage the permissions.

For us we also had this problem, that in microsoft graph api the calendar id(that was created by user A) is different for user A and B for the following request, as it is a base64 encoding of something:

/users/user-id/calendars

More about the graph api groups you can find here.

Cristina
  • 86
  • 1
  • 3