How can i get a user using email address with Graph API?

Bhaskar Ray 1 Reputation point
2022-09-21T09:44:49.76+00:00

I want to get the user information based on the email id, is this query correct?
https://graph.microsoft.com/v1.0/users?$filter=mail+eq+'abc.onmicrosoft.com'

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

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,686 Reputation points Microsoft Vendor
    2022-09-21T12:37:57.273+00:00

    Hi @Bhaskar Ray ,

    You can User Principal Name(UPN) and Email both are same you can simply use GET /users/mail@contoso.onmicrosoft.com.

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    4 people found this answer helpful.