An API that connects multiple Microsoft services, enabling data access and automation across platforms
The answer was NOT(fileExtension:docx)... very strange syntax...
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am doing Microsoft Graph searches for file types like this:
fileExtension:docx
How do I perform a search excluding file types, e.g.
(fileExtension:* and not fileExtension:docx)
So it would return everything except DOCX files?
An API that connects multiple Microsoft services, enabling data access and automation across platforms
The answer was NOT(fileExtension:docx)... very strange syntax...
Hi @catmanjan ,
Thank you for reaching out to Microsoft!
You can use the following APIs below:
https://graph.microsoft.com/v1.0/me/drive/root/search(q='a')?filter=folder ne null
Please go through this documentation to understand how filter paramter is used
https://learn.microsoft.com/en-us/graph/query-parameters#filter-parameter
"DriveItem" has a "folder" property that's only present for folders, so that just checks if "folder" ne (not-equals) null:
https://learn.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0#properties
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment