Hello,
I need to get the list of my emails and exclude all the archived ones.
I guess this is the right endpoint https://graph.microsoft.com/v1.0/me/messages
What should I add to the call?
Thanks
Hello,
I need to get the list of my emails and exclude all the archived ones.
I guess this is the right endpoint https://graph.microsoft.com/v1.0/me/messages
What should I add to the call?
Thanks
To get the desired results, you need Archive folder id use this below endpoint for the same
https://graph.microsoft.com/v1.0/me/mailFolders

To get the results, you can use the below endpoint using Filter.
https://graph.microsoft.com/v1.0/me/messages?$filter=parentFolderId ne '{ArchievefolderID}'
Result
Using the above endpoint, you will get all mails except Archive Mail.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".
3 people are following this question.
Exchange server 0Auth authorization for single mailbox from backend service
Send email with attachment - MS Graph
Unable to send multilple large files with email ( > 4mb ) using graph API by creating upload session
Count unread emails with mail.readbasic permission?
Wrong encoding when sending mails with HTML body using MS Graph API and Java SDK client