Forum Discussion

rohanw24's avatar
rohanw24
Brass Contributor
Nov 21, 2022

Error 404 when trying to fetch mail messages

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:

 

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/daemon-console

 

Thanks & Regards,

Rohan

No RepliesBe the first to reply

Resources