How to list mails in personal mailbox by accessing without a user and using Microsoft Graph SDK?

Chong Liu 40 Reputation points
2023-10-27T10:03:13.9666667+00:00

when i debug in com.microsoft.graph.demo.graphapponlytutorial.Graph#getInbox, and throw an exception named ErrorInvalidUser with error message "The requested user 'fate_guitar@outlook.com' is invalid."

java code is in the attachement named App.txt企业微信截图_16984007351466

App.txt

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

Accepted answer
  1. CarlZhao-MSFT 31,976 Reputation points
    2023-10-27T10:42:55.8966667+00:00

    Hi @Chong Liu

    Do not try to use the application token to retrieve mail for the personal account, it can only be used for your work account.

    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 additional answers

Sort by: Most helpful