Graph API - got invalid user error with a valid user-id

Jason Leung 20 Reputation points
2025-01-18T17:43:48.93+00:00

I queried /users to get my user-id, and able to get the user info with /users/{my-id}. But when I query /users/{my-id}/mailFolders, I got the below error message in both my app using app permission and graph explorer.

The requested user 'xxxxxxxxx' is invalid.

Is it not possible to use app permission with personal microsoft account?

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

Accepted answer
  1. CarlZhao-MSFT 45,841 Reputation points
    2025-01-20T02:11:17.5+00:00

    Hi @Jason Leung

    Yes, application permissions are not supported for personal accounts. Also, personal accounts do not require a MS 365 subscription, which is necessary for work accounts.

    Personal accounts are only available in a delegated context. Try logging in your user to Graph Explorer and calling the /me/mailFolders endpoint.

    User's image

    Hope this helps.

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

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Manu Philip 20,101 Reputation points MVP
    2025-01-18T18:55:56.8233333+00:00

    Hi Jason Leung,

    I published an article to show how to Create Custom Folder in Exchange Online Mailboxes using Graph API. I have explained the app permission requirement in the article. Please have a look at the article and see it helps to resolve the issue

    Hope this helps.


    --please don't forget to upvote and Accept as answer if the reply is helpful--

    1 person found this answer helpful.

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.