Best way to list users NOT part of a group?

Let’s say my organization contains many groups, and each user can be part of several groups.

What is the best way to list all users that are not part of, say, the “Executive” group.

Thanks

Hello. AFAIK there is not a great, existing way to accomplish this. From a logical standpoint, you would want to use Okta’s filter language with something like:

user.groups ne "Executive"

However we don’t currently support any properties that would achieve this:

  • Supports only a limited number of properties: status , lastUpdated , id , profile.login , profile.email , profile.firstName , and profile.lastName .

It may not be a bad Okta Idea submission: Okta Help Center (Lightning)

Beyond that, the best (albeit clunky) way to achieve this I think would be to use the API to list all members of a group, then make a call to list all users. Iterate over the users obtained from the latter and compare it to the former.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.