Is it possible to retrieve my personal account mail using Graph API

Mensina Kary 20 Reputation points
2023-03-28T13:49:55.3+00:00

Hi

Is it possible to retrieve my personal account mail using Graph API.
If so why I am getting this error
User's image

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

Accepted answer
  1. Shivam Dhiman 6,051 Reputation points
    2023-03-28T13:59:24.4366667+00:00

    Hi @Mensina Kary

    As per the documentation, yes you can retrieve your personal Microsoft account messages using Graph API.
    The error occurs when you do not have required permissions in your token. To get mails you need to consent Mail.ReadBasic, Mail.Read permissions.
    To add these permissions, go to modify tab and consent these permissions. Please refer to the below sample screenshot:

    permissions

    Reference documentation : https://learn.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0&tabs=http#permissions

    Hope this helps.

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

    0 comments No comments

0 additional answers

Sort by: Most 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.