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”

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?

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