您好,我对 microsoft graph 有两个疑问:
https://graph.microsoft.com/v1.0/me
https://graph.microsoft.com/v1.0/me/memberOf?$count=true&$filter=id('xxxxxxxxxxxxxx')
第一个仅返回用户的信息,第二个如果用户属于给定组。
如何将它们合并到单个查询中以绘制图表? 非常感谢
从OData的角度来看,您可以展开
memberOf
并应用内部过滤器,例如
GET https://graph.microsoft.com/v1.0/me?$expand=memberOf($filter=id eq 'xxx')
但 Graph API 似乎不支持
memberOf
的内部过滤器并返回所有组。
唯一的方法是扩展
memberOf
并在客户端应用过滤
GET https://graph.microsoft.com/v1.0/me?$expand=memberOf