如何从AAD组获得小组会员资格

发布于 2025-02-10 03:24:31 字数 557 浏览 1 评论 0原文

我正在尝试从AAD获取所有小组成员资格。我必须命名要寻找的父组,但是我需要获取该父母子组中的用户。我已经尝试了Mayosoft文档上的可能的事情,但是找不到找到这些组的正确请求。

这是一个尝试:

var groups = await graphClient.Groups.Request().Filter($"startswith(displayName, '{Se_groupName}')").GetAsync(); //Fetch the parent group
var groupMembers = await graphClient.Groups[groups.FirstOrDefault().Id].Members.Request().GetAsync(); //Try to fetch the groups inside the first group, but its always empty

我想知道是否有这样的请求:

graphClient.Groups[groups.FirstOrDefault().Id].groupMemberships

I'm trying to fetch all group memberships from an AAD. I have to name of the parent group I want to look for, but I need to fetch the users that are in sub groups of that parent. I've tried may things on the Microsoft docs, but I can't find the right request to find those groups.

This is a try:

var groups = await graphClient.Groups.Request().Filter(
quot;startswith(displayName, '{Se_groupName}')").GetAsync(); //Fetch the parent group
var groupMembers = await graphClient.Groups[groups.FirstOrDefault().Id].Members.Request().GetAsync(); //Try to fetch the groups inside the first group, but its always empty

I was wondering is there a request like:

graphClient.Groups[groups.FirstOrDefault().Id].groupMemberships

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒浓于脸红 2025-02-17 03:24:31

要查找嵌套组和用户,您可以使用trantivembers endpoint

列表组传递成员

获取https://graph.microsoft.com/v1.0/groups/groups/ {groupiD} /TransitiveMbers

To find the nested groups and users you can use the transitiveMembers endpoint

List group transitive members

GET https://graph.microsoft.com/v1.0/groups/{groupId}/transitiveMembers

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文