Microsoft Graph API - Mail

Mathew P Thomas 41 Reputation points

Hi Team,

I m using MS Graph API to call Mail API. I am able to get the token via postman by calling

I use the token from above api to call :

I get the below error:

"error": {
"code": "BadRequest",
"message": "/me request is only valid with delegated authentication flow.",
"innerError": {
"date": "2021-09-30T18:50:40",
"request-id": "f4431d06-9434e-4f1d-9434-43a763256a3b",
"client-request-id": "1e3c1d06-943f-4f1d-94334-44a7633276a3b"

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

Accepted answer
  1. CarlZhao-MSFT 40,236 Reputation points

    The error should be caused by you using the client credential flow. You are calling the /me endpoint, so you should use the delegated authentication flow with user login to obtain the token. For example, auth code flow or ROPC flow.

    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Kat Hopkins 1 Reputation point

    Hi, Matthew, can you please write up what you did to get it working? I am trying to do something similar from flow to call Calendars.Read and get the same error you initially had. ANy help would be appreciated

  2. Kat Hopkins 1 Reputation point

    Thank you for that, I will see if that is what is going on with my flow.

    0 comments No comments