Fetch users associated with an application along with all the groups user is part of using Okta SDK Skip to main content
https://support.okta.com/help/answers?id=9062a000000bmygqay&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Jay MairJay Mair 

Fetch users associated with an application along with all the groups user is part of using Okta SDK

Hi,

I am using Okta SDK to fetch the list of users associated with the application. I am using the following endpoint: {{url}}/api/v1/apps/{{appId}}/users

I am getting all the users and each user has a "_links" attribute that has app, group and user as keys. It seems that the group attribute shows only the first group associated with that user. If user is part of 3 groups and all the groups are associated with the application, it does not show all the groups.

What is the best way to fetch user and it's groups for an application?
Mihai NegoitaMihai Negoita (Okta, Inc.)
Hi Jay,

The current Collection of Okta API does not include a way to fetch users associated with an application along with all the groups user is part of.

{{url}}/api/v1/apps/{{appId}}/users - get the users and {{url}}/api/v1/apps/{{appId}}/groups to get the groups.