<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y000088SP8VSAWOkta Classic EngineLifecycle ManagementAnswered2024-04-15T09:57:51.000Z2020-03-30T14:06:51.000Z2021-02-19T10:12:50.000Z

1fj3q (1fj3q) asked a question.

Retrieve app group(s) for a user using OKTA API

I'm not able to find an direct API call, which can retrieve app group(s) of which a user is memberOf. The only API I found was /api/v1/users/${userId}/groups which retrieves all the groups assigned to a user and then Client will need to filter based on the app. This becomes challenging when a user has access to mutiple apps and each app have multiple groups.

 

I'm looking for an API end point which can return user groups for a particular app.


  • 1fj3q (1fj3q)

    {{url}}/api/v1/apps/{{appId}}/groups retrieve groups for an app only but I'm looking to retrieve groups associated with app for a User.

  • I'm not aware of an end point that returns that specific information. You'd need to programmatically compared groups assigned a user to the groups assigned to the application.

     

    Joe

  • 1fj3q (1fj3q)

    That becomes a challenge when customers have ~100 apps and when each application needs to retrieve group membership to implement fine grained app permission. If each app has app groups specific to location where ​user works then number of group members increases exponentially and will cause performance impact.

  • c91g4 (c91g4)

    I am interested in this as well. I can't find a reliable or relatively simple way to remove a user from an app if they were assigned the app via a group or group rule. This seems like a fundamental need for most organizations since this is most likely how security and IT teams will programmatically unassign inactive users from certain apps if they haven't authenticated to them in X amount of time. I have no problem using the API to get the lastLogin for an app, getting all of the user's groups, and other prerequisite info, but if I need to remove a user from an application, I can't just use the 'Remove user from application' endpoint because Okta doesn't allow unassigning an app from someone if they were assigned that application via a group or group rule. We need an endpoint to remove a user from an application group by providing only userID and appID. When a user is assigned to 50+ groups looping through and doing app_group comparisons is painful. If anyone knows a better way to accomplish this, let me know.

    Expand Post
This question is closed.
Loading
Retrieve app group(s) for a user using OKTA API