Getting error while reading the user by email address

BS 20 Reputation points

Hello there,

I wanted to explore the Microsoft graph API's for creating the online meeting events via teams meeting.

Now the events must be related to respective users. To get the user i have followed below.

I have enrolled into the trial version of the Microsoft 365 along with Azure services as well. Then registered application in azure with necessary application level read permission for user. Then able to generate the able to generate the oauth token via{client_id}/oauth2/v2.0/token. Using the generated access token as bearer for the API "User by email" to get the user id.

But, i get below error

API :{emai_address}/

Response :


"error": {

"code": "Request_ResourceNotFound",

"message": "Resource '{email_Address}' does not exist or one of its queried reference-property objects are not present."



API permissions :

"roles": [


























the email address used in the above request is same as the address used during the registration of the account in office 365 and Azure portal.

Where am I going wrong.

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

Accepted answer
  1. Vasil Michev 97,231 Reputation points MVP

    Graph does not work with email addresses, the closest you can get to using the email value is the UPN (UserPrincipalName), but they're not guaranteed to match. If you have used a personal/consumer account when registering the trial, your UPN will be in the form, for example.

    Do a LIST query against the /users endpoint and fetch the id and userPrincipalName values for the user(s) in question, then use them in your request.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful