Reputation: 3
I'm using the Graph Explorer to execute the sample query "my mail", which is just "https://graph.microsoft.com/v1.0/me/messages", however I'm receiving the following error:
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"request-id": "71227405-861e-493c-83d6-162f4434aa4c",
"date": "2019-06-14T16:06:41"
}
}
}
Per the Graph API "get messages" article (https://learn.microsoft.com/en-us/graph/api/message-get?view=graph-rest-1.0&tabs=cs) the only permission I need is "Mail.Read".
I cant post images (new account) but here's a copy paste from the modify permissions screen:
Mail.Read Consented
Mail.Read.Shared Consented
Mail.ReadBasic Consented
Mail.ReadWrite Consented
Mail.ReadWrite.Shared Consented
Mail.Send Consented
Mail.Send.Shared Consented
MailboxSettings.ReadWrite Consented
The other sample queries of "my profile" and "items trending around me" work.
Can anybody shed some light on this?
Changed permissions, searched on stackoverflow for similar issues, and changed the GET query.
Upvotes: 0
Views: 252
Reputation: 2447
Can you try removing the Mail.ReadBasic
permission? I think Exchange is throwing an access denied error because of conflicting permissions.
Edit: I believe the Mail.ReadBasic
scope is only meant to be used in /beta version. If you're using v1.0 make sure to not consent to it. If you do consent, you can revoke the app (be careful with this though if your app isn't just for dev purposes!)
Upvotes: 1