'Office 365 Calendar Id changes

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.



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1