Hello everyone I have tried to send email by outlook using graph API based on the access token, But I'm faced with this issue.
"/me request is only valid with delegated authentication flow."
Send email based on outlook.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jayraj ChhayaRank #304 · 8.2K reputationPosted Apr 24, 2024, 3:06 AM EDT
To resolve the "/me request is only valid with delegated authentication flow" issue when sending emails through Outlook using the Graph API, ensure that you are using the correct authentication method. You need to switch from application permissions to delegated permissions for the "/me" endpoint to work properly.
GraphServiceClient graphClient = new GraphServiceClient( authProvider ); var message = new Message { Subject = "Hello from Graph API", Body = new ItemBody { ContentType = BodyType.Text, Content = "This is a test email sent via Graph API." }, ToRecipients = new List { new Recipient { EmailAddress = new EmailAddress { Address = "[email protected]" } } } }; await graphClient.Me.SendMail(message, true).Request().PostAsync();Make sure to authenticate using a user token with the necessary permissions to send emails on behalf of the user. This way, you can avoid the authentication flow issue and successfully send emails through Outlook using the Graph API.
Sourabh DhimanRank #2,987 · 483 reputationPosted Apr 24, 2024, 3:21 AM EDT
I have switched from application permission to delegated permission but this not working.