MSFT Graph API:无法筛选我的租户上的 GUEST 用户

MSFT Graph API: Unable to filter GUEST users on my tenant

我使用以下端点仅查询租户中的 GUEST 用户

https://graph.windows.net/<tenantId>/groups/<groupId>/members?api-version=1.5&$filter=userType%20eq%20'Guest'

这将返回以下错误

状态码 400

回复正文 {"error":{"code":"Request_UnsupportedQuery","message":{"lang":"en","value":"The specified filter to the reference property query is currently not supported."}}}

我怎样才能克服这个错误?

不幸的是,Azure AD Graph API 目前似乎不支持 userType 的过滤查询。

根据我的测试,并非所有属性都受支持。因此,我建议您可以 post 在 this Uservoice Page 中提供有关 Azure AD Graph API 的反馈。 Azure 团队将对其进行审查。

希望对您有所帮助!