Shree
Shree

Reputation: 67

Microsoft Graph API status code 404 not found error

I am new to Azure and Microsoft Graph API. I am trying to access: https://graph.microsoft.com/v1.0/me/messages and I am getting a `404 Not Found.

I took the access token and decrypted in JWT and I can see the access token contains my name and credentials and the scopes defined are :

Directory.AccessAsUser.All Directory.Read.All email Files.ReadWrite Group.Read.All Mail.Send offline_access openid profil.Read

Can someone please suggest why I am getting a bad request?

Upvotes: 2

Views: 6136

Answers (1)

astaykov
astaykov

Reputation: 30903

In order to list (read) the mail messages (as described here) you need the Mail.Read or Mail.ReadWrite (if you also want to write messages) permission (scope).

With respect to mailing functionality you only have requested (or granted?) Mail.Send permission which only allows you send message (as described here).

The email claim is OpenID Connect specific claim and provides the logged-in user's email as claim. It has nothing to do with Exchange Online and sending/receiving e-mails.

Upvotes: 3

Related Questions