Is event ID in MS Graph API unique?

Gerald Consolidate 1 Reputation point
2021-06-21T07:09:41.923+00:00

Is the ID of the event resource type unique across all user calendars? Or is the uniqueness only within a calendar?

In other words: Can the appointment "Foo" in the calendar of user A and the appointment "Bar" in the calendar of user B have the same ID? Or is the event ID unique across the calendars?

The background to the question is that we store the event IDs in our database and use them for appointment updates via the Graph API. If the event ID is not unique, that would of course be a problem.

I already posted the question here on Stackoverflow. But since the matter is very important to us, I need a definitive answer.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,560 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Shweta Choudhary 601 Reputation points Microsoft Employee
    2021-06-23T06:30:41.75+00:00

    Based on your requirement, I recommend you to use iCalUId instead.

    The iCalUId returned by the Calendar event resource type in Microsoft Graph is defined as a unique, read-only identifier that is shared by all instances of an event across different calendars.

    References -

    1. https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-calendar-events-icaluid-update/
    2. https://learn.microsoft.com/en-us/graph/api/resources/event?view=graph-rest-1.0

    Hope this helps. Thanks!

    0 comments No comments

  2. Gerald Consolidate 1 Reputation point
    2021-06-23T08:18:19.22+00:00

    I already use the iCalUId wherever I can. However, there is a scenario where I only have the EventId available:
    I use the event delta API to get new, changed and deleted events from the exchange calendar.
    If an appointment has been canceled or deleted, the delta event only contains the EventId (see screenshot). In this case I can only work with the EventId.
    Therefore I would like to know whether the event IDs are unique across all calendars.

    108489-2021-06-23-09-29-08-consolidate-debugging-microsof.png

    0 comments No comments

  3. Shweta Choudhary 601 Reputation points Microsoft Employee
    2021-06-23T08:26:46.593+00:00

    The id can change if the user moves the event into another calendar. One way to get around that is to use immutable ID, available on the beta endpoint: https://learn.microsoft.com/graph/outlook-immutable-id.

    Reference - https://github.com/microsoftgraph/microsoft-graph-docs/issues/4447


  4. Gerald Consolidate 1 Reputation point
    2021-06-23T08:49:42.687+00:00

    Thanks for the tip with the Immutable IDs.
    How stable is the beta endpoint? Is it advisable to use it for projects that are used by customers?