Error 404 when trying to fetch mail messages

Contributor

Hello Everyone,

 

I've created a C# Daemon console app for reading mails from my own mailbox. Here are the list of all permissions that I've included with admin consent:

 

rohanw24_0-1669053877294.png

I'm able to generate authorization token and make a successful GET request to the following endpoint: https://graph.microsoft.com/v1.0/users/{ id | userPrincipalName }

 

But when I try to make a request to fetch messages using below endpoint, I get 404 Not Found error:

https://graph.microsoft.com/v1.0/users/{ id | userPrincipalName }/messages

https://graph.microsoft.com/v1.0/users/{ id | userPrincipalName }/mailfolders/inbox/messages

 

What could be the possible reason behind this issue?

 

I've referred this link for creating daemon app:

https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2/tree/master/1-Call-MSGraph/da...

 

Thanks & Regards,

Rohan

0 Replies