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).
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