Does Okta provide any API to get list of available users with Groups?

I could not find any API to list the available users along with the groups they are part of, does Okta provide any such API?

I am referring to this link currently.

Hi @VAMSI_VEGESNA,

You can get the groups that a user belongs to using this API - https://developer.okta.com/docs/reference/api/users/#get-user-s-groups

You can also get all the users in a group using this API - https://developer.okta.com/docs/reference/api/groups/#list-group-members

You can first get all the available users in your org, and then list the groups they’re part of, using this.

Yes @vijet, I think the second reference could better help my requirement. Because in my use case I have to display all the list of available users along with their roles in the form of a table. So by considering this getting roles for each user by iterating would be costly. I will get each group along with its users which is comparatively less costlier(less number of Okta API hits from my code base) after that I can do user to group mapping in my code.

1 Like