You cannot use $filter with /drives, only $select, as documented here: https://learn.microsoft.com/en-us/graph/api/drive-get?view=graph-rest-beta&tabs=http#optional-query-parameters
Microsoft Graph API - OData - Fetch Drives using $filter
Artha Wijendra
131
Reputation points
When testing the Microsoft graph API (via the Microsoft Graph Explorer) I noticed the following.
- Fetch All Users (Works Fine) - https://graph.microsoft.com/v1.0/users
- Fetch Users with Name Adele (Works Fine) - https://graph.microsoft.com/v1.0/users?$filter=givenName eq 'Adele'
- Fetch all Drives (Works Fine) - https://graph.microsoft.com/v1.0/drives
- Fetch details of Drive Documents (Fails, instead fetches all drives) - https://graph.microsoft.com/v1.0/drives?$filter=name eq 'Documents'
So it seems that the $filter does not work against the Drives endpoint ? Is this a defect ?
We really require this feature to develop my application.
Microsoft Security Microsoft Entra Microsoft Entra ID
25,081 questions
Accepted answer
-
Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
2020-08-06T06:19:13.837+00:00
1 additional answer
Sort by: Most helpful
-
Amos Wu-MSFT 4,051 Reputation points
2020-08-06T03:00:17.587+00:00 You could try this endpoint:
https://graph.microsoft.com/v1.0/drive/root/children?$filter=name eq 'moment.min.js'