Using the Microsoft Graph how do I look up a group by email address?

我们两清 提交于 2019-12-25 06:27:14

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/37221122/using-the-microsoft-graph-how-do-i-look-up-a-group-by-email-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!