Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,038 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
Is there any way I can do the following:
Thanks
Ward
You can do it using and Advanced query with filter https://learn.microsoft.com/en-us/graph/aad-advanced-queries?tabs=http eg
$filter=NOT(categories/any())&count=true
or with the Graph SDK
var queryOptions = new List<QueryOption>()
{
new QueryOption("$count", "true")
};
var uncatMessages = graphClient.Me.MailFolders["Inbox"].Messages.Request(queryOptions)
.Header("ConsistencyLevel", "eventual").Filter("NOT(categories/any())").GetAsync().GetAwaiter().GetResult();