使用Microsoft Graph,我该如何通过电子邮件地址查找一个组?

3
我正在使用Graph Explorer来操作Microsoft Graph。我了解您可以通过指定其ID来访问组,例如 -
https://graph.microsoft.com/v1.0/groups/14481298-e121-4d97-91d5-3fe555aa2871

你也可以像这样获取它的成员 -
https://graph.microsoft.com/v1.0/groups/14481298-e121-4d97-91d5-3fe555aa2871/members

但是我不清楚如何通过电子邮件地址查找组并在一次调用中列出成员。现在我知道了,所以我想分享,并问是否有更好的方法。

1个回答

4
为了通过电子邮件获取组,您可以按mail属性进行过滤。但是这确实返回一个数组,与原始查询略有不同。
https://graph.microsoft.com/v1.0/groups/?$filter=mail+eq+'sampleDL@example.com'

为了获取成员,您可以展开成员。
https://graph.microsoft.com/v1.0/groups/?$filter=mail+eq+'sampleDL@example.com'&$expand=members

如何使用 $select=id,mail 进行筛选? - user6874415
我不确定你在问什么。 - LookingSharp

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接