Getting Access Denied even though I have the proper access token and permissions

josh j 0 Reputation points
2025-01-08T00:51:12.4733333+00:00

Hi,

So my main goal is to get the list of emails from my outlook thru automation.

My steps to reproduce:

The response I get is:

error: {

code: 'ErrorAccessDenied',

message: 'Access is denied. Check credentials and try again.'

}

But I know the access token has got to be valid since I'm able to hit the graph API and get my user info (e.g. mail, displayName, givenName, etc).

The permissions on my App:
User's image

Any insight would be well appreciated.

Outlook
Outlook
A family of Microsoft email and calendar products.
4,504 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,357 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 45,996 Reputation points
    2025-01-08T02:54:59.86+00:00

    Hi @josh j

    Try logging into your MS Entra ID as a global admin, then find the calling app and grant admin consent for the above permissions.

    Screenshot 2025-01-08 104913

    Hope this helps.

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


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.