如何使用Microsoft Graph通过电子邮件地址查找组? [英] Using the Microsoft Graph how do I look up a group by email address?

查看:124
本文介绍了如何使用Microsoft Graph通过电子邮件地址查找组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用图形浏览器来玩 Microsoft Graph .我了解您可以通过指定其ID来访问组,就像这样-

I'm using the Graph Explorer to play with the Microsoft Graph. I understand you can access a group by specifying its id, like so -

https://graph.microsoft.com/v1.0/groups/14481298-e121-4d97-91d5-3fe555aa2871

,您也可以像这样获得其成员-

and you can get its members as well like this -

https://graph.microsoft.com/v1.0/groups/14481298-e121-4d97-91d5-3fe555aa2871/members

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

But it isn't clear to me how you lookup a group by its email address and list the members in one call. I now know, so I thought I would share, and also ask if there is a better way.

推荐答案

要通过电子邮件获取组,可以按mail属性进行过滤.但是,这确实会返回一个数组,该数组与原始查询略有不同.

To get the group by email you can filter by the mail property. However this does return an array, which is slightly different from the original query.

https://graph.microsoft.com/v1.0/groups/?$filter=mail+eq+'sampleDL@example.com'

要获取成员,您可以扩展成员.

To get the members you can expand members.

https://graph.microsoft.com/v1.0/groups/?$filter=mail+eq+'sampleDL@example.com'&$expand=members

这篇关于如何使用Microsoft Graph通过电子邮件地址查找组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆