I am trying to use the MS Graph SDK (beta) for C# to get all the groups a user belongs to transitively with a filter to only get "security groups".
My code looks like this:
var upn = "[email protected]";
var request = await _graphClient.Users[upn].TransitiveMemberOf
.Request()
.Filter("securityEnabled eq true")
.GetAsync();
When I run this code, I get an error that The specified filter to the reference property query is currently not supported
. I know that the same API endpoint can be called successfully using Postman with the same filter so I assume I'm missing something in my C# code?
Please use the below code for filtering the securityEnabled in c# using graph sdk