mabster's avatar
mabster
Brass Contributor
Jul 22, 2022
Status:
New

Filter Groups by (transitive) Members

We have lots of groups, but only a handful of them contain guest members.

 

If I want to get all the groups with guests, I have to get all the groups and then iterate over them client-side to determine which ones have members.

 

I'd love if we could filter based on members (or transitiveMembers) server side, like this:

 

GET /groups?$filter=members/any(x:x/userType eq 'Guest')

 

or

 

GET /groups?$filter=transitiveMembers/any(x:x/userType eq 'Guest')

 

This would make for a much more streamlined and less "chatty" experience!

 

I realise that members is just a "directoryObject" and doesn't have a "userType" property, but I guess there's probably a way to cast it via OData and pull this off. I'm very new to this stuff. 🙂

 

Cheers,
Matt

 

No CommentsBe the first to comment