Is there a way to get the User Primary Email Address Using MS Graph

yeison bernal 21 Reputation points

I have been working with Outlook 365 Synchronization , and we are having issues with users that use a Primary email address that is different from UserName.
I was checking the documentation of MS Graph and I can't find a way to relate a UserName with a Primary email address of an specific User.


does this 2 emails have the same Id ? or is it possible to get from MS Graph , I have tried with different properties (mail, identities, otherMails)

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

1 answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,846 Reputation points

    Hello @yeison bernal , the otherMails property can list additional email address for the user, try to get user by primary email address using following API.$filter=otherMails/any(c:c eq '{Primary Email Address }')  

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.