- I believe you're using Client Credentials grant flow above and you want to access the other user mailbox's email items. Make sure that you have the necessary permissions to access the other user mailbox. Validate the token at https://jwt.ms and see you have the necessary permissions/scopes defined. For more information, refer the detailed step-by-step documentation which talks about the same.
Access denied when fetching mails of organization users
Assume the organization is abc.onmicrosoft.com.
After having logged in as a user with Global Administrator and having granted all the required permissions in the Graph Explorer, the following query-
"https://graph.microsoft.com/v1.0/users/some_user@jaswant .onmicrosoft.com/messages"
The following is the response-
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"date": "2021-03-19T08:10:19",
"request-id": "ffb0c7bd-8194-4fa4-afa4-22d1af483e2e",
"client-request-id": "4195b1bc-7d86-9209-1c0b-a71396ccc5cb"
}
}
}
1 answer
Sort by: Most helpful
-
Deva-MSFT 2,266 Reputation points Microsoft Employee
2021-03-20T04:20:42.06+00:00