Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Graph Api officeLocation

I am trying to run:

https://graph.microsoft.com/beta/users?$filter=startsWith(officeLocation, 'MOD')
and according to Microsoft Docs user resource type:

officeLocation String
Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values).

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

However, the response I am getting is:
"error": { "code": "Request_UnsupportedQuery", "message": "Unsupported or invalid query filter clause specified for property 'officeLocation' of resource 'User'.",

What am I missing or doing wrong?

>Solution :

Try to add query parameter $count=true and header ConsistencyLevel:eventual.

https://graph.microsoft.com/beta/users?$filter=startsWith(officeLocation, 'MOD')&$count=true

Advanced query capabilities on Azure AD directory objects

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading