使用Graph API查询组中的用户 [英] Using Graph API to query users in a group

查看:63
本文介绍了使用Graph API查询组中的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Graph API查询属于特定广告组的用户(按其给定名称等).是否可以在单个通话中执行此操作,例如

I'm trying to use the Graph API to query users (by their given name etc.) that belong to a specific AD group. Is it possible to do this in a single call e.g.

https://graph.windows.net/ /groups/{group_id}/members?api-版本= 1.6&

 https://graph.windows.net/{{subscription_name}}/groups/{group_id}/members?api-version=1.6&$filter=givenName eq 'Alistair'

或者在调用用户对象时可能应该过滤用户和组?

or possibly I should filter the users and group when calling the users object?

用户过滤器可以工作,但不能确定如何在AD组成员资格上添加组过滤器...
https://graph.windows.net/ /groups/{Group_id}/members?api-version=1.6 &

The user filter works but not shure how to add the group filter on the AD group membership...
https://graph.windows.net/{{subscription_name}}/groups/{Group_id}/members?api-version=1.6&$filter=givenName eq 'Alistair'

任何帮助表示赞赏.

谢谢!

Thanks!

推荐答案

进行客户端过滤以搜索特定成员.

Both Microsoft graph and Azure AD graph does not support the filter query against group members.  Also, https://graph.windows.net/{{subscription_name}}/groups/{Group_id}/members?api-version=1.6 returns a list of directoryObject's which contains object id of the resource, hence no filter will support. Even though the user resource inherits from directoryObject you can't filter on specific user attribute like givenName or userprinicipalname here.  You might have to do a client-side filtering to search for specific members.
You can upvote the User voice already exists for this limitation- https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/35630488-enable-filter-on-group-members. 


这篇关于使用Graph API查询组中的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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