Filter on User officeLocation
Using the Microsoft Graph API, I am able to filter out results on a /user/ endpoint using various properties on each User object, like "$filter=givenName eq 'somename'" and "$filter=startswith(mobile, '9188')", but I am not able to filter on the "officeLocation" property, instead receiving the message "Unsupported or invalid query filter clause specified for property 'officeLocation' of resource 'User'."
I am currently developing the backend API of a webservice, and filtering on "officeLocation" is a crucial part in our particular case as we use "officeLocation" to denote which store a particular user belongs to. To fetch all users belonging to a particular store I could have used "$filter=startswith(officeLocation, '<store number>')", as each "officeLocation" starts with the store's unique number. Instead, I have to fetch ALL users (roughly 13000 users), and filter them on my end. Fetching absolutely all the users takes roughly 3 minutes, give or take, meaning we now have to cache these users to speed up fetches.
It would be considerably simpler for our particular case and many other like it, and it would fit the rest of the Microsoft Graph API, to allow filtering on "officeLocation".
This category has been deprecated. Please go to https://microsoftgraph.uservoice.com/ to submit any feature requests related to Microsoft Graph, EWS, Outlook APIs, and O365 REST APIs.
Filter on officeLocation is not available till date, we can query for all user than can filter out from that based on officeLocation, API will not return all user in one call, Microsoft Graph will continue to return a reference to the next page of data in the @odata:nextLink property with each response until all pages of the result have been read.You can retrieve the next page of results by sending the URL value of the @odata:nextLink property to Microsoft Graph.