I'd like to get group members from Graph. No problem, the API is there. I now want to filter for members that are groups themselves and there even is a sample for this on the docs page:
See the /microsoft.graph.group
part of the URL? That's what I want, but via Graph SDK.
Switching the sample to C# to see the corresponding code there is no evidence of this microsoft.graph.group
URL part anymore:
Am I blind? How to apply this filter via Graph SDK?
Filtering is not supported by SDK code generator. As an alternative you can add segment to request url manually.
var graphClient = new GraphServiceClient( authProvider );
var requestUrl = graphClient.Groups["{group-id}"]
.TransitiveMembers
.AppendSegmentToRequestUrl("microsoft.graph.group?$count=true");
var group = await new GroupTransitiveMembersCollectionWithReferencesRequest(requestUrl, graphClient, null)
.Header("ConsistencyLevel", "eventual")
.GetAsync();