图 Api officeLocation

Graph Api officeLocation

我正在尝试 运行:

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

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

但是,我得到的回复是:
"error": { "code": "Request_UnsupportedQuery", "message": "Unsupported or invalid query filter clause specified for property 'officeLocation' of resource 'User'.",

我错过了什么或做错了什么?

尝试添加查询参数 $count=true 和 header ConsistencyLevel:eventual.

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

Advanced query capabilities on Azure AD directory objects