As far as I know, this capability is currently not supported via MS Graph API. I have created this GitHub Issue that may help provide details of whether this is possible and how to achieve it.
How to retrieve uncategorized emails using Microsoft Graph API
Hi,
I am using Microsoft Graph to retrieve the emails from the mailboxes, I know how to get the emails based on categories using below query.
https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?$filter=categories/any(c:c eq 'Yellow category')
However I want to retrieve all the emails or count of all the emails which don't have any categories assigned. I tried using the above query in other way as
https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?$filter=categories/any(c:c ne 'Yellow category')
and also like as below, but its not working.
https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?$filter=categories/any()
How can I achieve this?
Any help or pointers are appreciated.
2 answers
Sort by: Most helpful
-
Danstan Onyango 3,821 Reputation points Microsoft Employee
2021-05-13T13:33:07.92+00:00 -
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
8 deleted comments
Comments have been turned off. Learn more