How to Obtain a Unique Identifier for a Mailbox in Microsoft 365 Using Graph API

Diksha Yadav 81 Reputation points
2025-02-06T11:52:39.2433333+00:00

What is the stable and unique identifier for a mailbox in Microsoft 365 that can be retrieved using the Microsoft Graph API or Office.context? Which property should be used to ensure consistency across different API calls?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,990 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,226 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rajat Vashistha-MSFT 440 Reputation points Microsoft Vendor
    2025-02-06T12:14:22.01+00:00

    Hi Diksha Yadav,

    Thank you for reaching out to Microsoft!

    The stable and unique identifier for a mailbox in Microsoft 365 is the "id" property, which is a GUID (globally unique identifier). This identifier remains constant for the lifetime of the mailbox.

    To obtain immutable identifiers for Outlook resources, you can retrieve the ID using the following request: Obtain immutable identifiers for Outlook resources

    GET https://graph.microsoft.com/v1.0/Users/{userprincipalname}
    

    The JSON response will include the "id" value.

    Hope this helps.

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

    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.