Getting Forbidden error with mail graph api

DanielK 20 Reputation points
2023-03-17T07:52:22.8366667+00:00

Hi

I am trying to get mails using Graph API. I am getting Forbidden error even though I have admin role.
User's image

Can anyone can help me with this!

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

Accepted answer
  1. Shivam Dhiman 5,871 Reputation points
    2023-03-17T07:57:37.0266667+00:00

    Hi @DanielK

    To get mails you need to consent Mail.ReadBasic, Mail.Read permissions. Go to modify tab and consent these permissions.
    After consenting these permissions you will be able to get your mails.
    Please refer to the below sample screenshot:
    User's image

    **
    Reference documentation**

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

Sort by: Most helpful