Searching for specific users in a group

Is there a way to search/filter on users in a group?

I’ve tried the following and it always comes back with the first person in the group. E.g. myself: Eric

{{url}}/api/v1/groups/{{groupId}}/users?limit=1&filter=user.profile.firstName eq “james”
{{url}}/api/v1/groups/{{groupId}}/users?limit=1&filter=profile.firstName eq “james”
{{url}}/api/v1/groups/{{groupId}}/users?limit=1&filter=firstName eq “james”
{{url}}/api/v1/groups/{{groupId}}/users?limit=1&q=“james”
{{url}}/api/v1/groups/{{groupId}}/users?limit=1&q=james

1 Like

I just tested this and it looks like the groups/{{groupId}}/users endpoint ignores any filter= or q= parameters. I’ll check to see if that is on our roadmap.

What are you hoping to achieve in the API?

1 Like

Thanks! Our UI, will allow Organization Admins (clients) to manage their own users. Users will be added to groups simulating clients. If a user doesn’t exist in our system yet, we want to give the org admins the ability to search for them (calling the Okta API), which would find the user and pull them into our system. Then they can manage the users rights. However when searching for user, we need to make sure that they only see their users by locking them into their group. I can get all the users back (from a particular group) and the filter them in our business logic, but that could mean several calls. The flip side is, we just write a sync utility that constantly (or on demand) pulls users from Okta and loads them into our system. If you know of a different approach for this use case let me know. Thx!

1 Like

Hello, This is the exact feature i am looking for, I want to filter user inside a particular group but unable to find anything, I tried both search and filter example

/api/v1/groups/00gwbudueuR6v10Vc0h7/users?search=profile.firstName eq "Meltest"

but it always returns all the users inside that group, can you please let me know how I can achieve this or if there another way to search user in a group, I do not want to make multiple calls as the OP has mentioned.

Hi @Melroy.Britto,

This feature doesn’t appear to be in the works at the moment. We welcome your feedback so please feel free to post this on Okta Ideas

It would be very helpful in a case that you want to show all your users in a table with the admin label (represented by the user group) it is kind of crazy to not having that feature…

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