如何使用ms graph api仅列出AAD中的安全组?

问题描述 投票:0回答:1

根据https://docs.microsoft.com/en-us/graph/api/resources/groups-overview?view=graph-rest-1.0的在线文档,有四个AAD组:Office365,安全性,启用电子邮件的安全性和分发。

我正在使用以下内容列出组:

        graphGroupsPages = await graphServiceClient.Groups
            .Request()
            //.Filter(????) <= if yes, what should it be?
            .GetAsync();

我已经看到了如何列出Office365(统一)组的示例。

如何仅列出安全组?

azure-active-directory microsoft-graph azure-ad-graph-api microsoft-graph-sdks
1个回答
2
投票

基于文档,您应该列出mailEnabled为假而securityEnabled为真的组。

var graphGroupsPages = await graphServiceClient.Groups.Request().Filter("mailEnabled eq false and securityEnabled eq true").GetAsync();
© www.soinside.com 2019 - 2024. All rights reserved.