Are ID fields of Graph objects globally unique?

Zarko Petrovic 40 Reputation points
2023-08-14T11:44:30.1+00:00

We are using Graph api to sync user's calendar items, tasks and emails.

Each of those objects have 'id' property. Are those globally unique? Is there a situation that for example Appointment and Email object can have same ID?

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 46,371 Reputation points
    2023-08-15T07:15:45.57+00:00

    Hi @Zarko Petrovic

    Yes, the object id is a unique identifier used to refer to the target object, it is impossible for different objects to have the same object id.

    However, object ids are not immutable. For example, this value changes when mail is moved from one container (such as a folder or calendar) to another. To change this behavior, use the Prefer: IdType="ImmutableId" header. See Get immutable identifiers for Outlook resources for more information.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. msft-gu 1,355 Reputation points
    2023-08-14T23:13:54.7633333+00:00

    Hi Zarko,

    Good afternoon and thank you for the question. Please create a ticket since we need to verify this with our product engineers and make sure that we will be providing correct information.

    Thanks!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.