{ "error": { "code": "ErrorInvalidUser", "message": "The requested user '6fbdab65-f39b-43d4-9140-bc6024e77fbe' is invalid." } }

Siddesh Sanjay Jadhav (TTL) 0 Reputation points
2023-08-09T16:39:47.6366667+00:00

I am getting following error when I am trying to access graph API using folllowing url
[https://graph.microsoft.com/v1.0/users/******@domain.com/mailFolders('inbox')/messages?$top=10](https://learn.microsoft.com/en-us/answers/questions/1343549/error-((-code-errorinvaliduser-message-the-request)

I have assigned permissions to read mail box for ******@domain.com user,
Still facing the above error.
I am trying to read inbox email of ******@domain.com
I am trying to call the API in postman. Also the status filed is granted to specific domain
Please helpError

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 30,296 Reputation points Microsoft Employee Moderator
    2023-08-11T06:14:56.6866667+00:00

    Hi @Siddesh Sanjay Jadhav (TTL) ,

    Thanks for reaching out.

    The error message indicates that the user you are trying to access is invalid. Please make sure that the user ID you are using is correct and that the user exists in your organization's directory.

    I repro the scenario at my end using valid user id exist in my Azure AD /Microsoft Entra ID and able to get the response successfully.

    User's image

    Did you try to pass objectId of the user in place of user id?

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" if answer helped you.

    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.