# List Users Assigned To App returns status active for all users

**URL:** <https://devforum.okta.com/t/list-users-assigned-to-app-returns-status-active-for-all-users/8106>\
**Category:** Questions\
**Tags:** api\
**Created:** [February 14, 2020, 8:39am UTC](https://devforum.okta.com/t/list-users-assigned-to-app-returns-status-active-for-all-users/8106 "2020-02-14T08:39:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruby](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ruby](https://devforum.okta.com/u/ruby)\
**Post date:** [February 14, 2020, 8:39am UTC](https://devforum.okta.com/t/list-users-assigned-to-app-returns-status-active-for-all-users/8106/1 "2020-02-14T08:39:47Z")

</div>

I currently have a problem with an Okta endpoint. /apps/{{app\_id}}/users is supposed to return all the users assigned to a certain app, however, I noticed that all the statuses are ‘Active’. When scooping through Okta’s admin dashboard, some of these users are actually suspended or are set to ‘Staged’. It seems that this endpoint doesn’t take the (correct) status into account. Can anyone help me with this? Thanks.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 14, 2020, 9:14pm UTC](https://devforum.okta.com/t/list-users-assigned-to-app-returns-status-active-for-all-users/8106/2 "2020-02-14T21:14:19Z")

</div>

This [API call](https://developer.okta.com/docs/reference/api/apps/#list-users-assigned-to-application) to the Apps endpoint doesn’t return Users, it returns [Application Users](https://developer.okta.com/docs/reference/api/apps/#application-user-model), a distinction that explains why the status found in the Application User doesn’t match the one in the User. Seeing ACTIVE for these users is expected behaviour, provided the user is assigned and confirmed by the application.

There’s more info about what these statuses mean in the [Apps documentation](https://developer.okta.com/docs/reference/api/apps/#application-user-status).

---

<div class="post-metadata">

**Author:** ![ruby](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ruby](https://devforum.okta.com/u/ruby)\
**Post date:** [February 19, 2020, 12:01pm UTC](https://devforum.okta.com/t/list-users-assigned-to-app-returns-status-active-for-all-users/8106/3 "2020-02-19T12:01:05Z")

</div>

@andrea Thank you for your response.

Do you have any idea how I can effectively gather the application users with the ‘real’ status that is assigned to them?

---

<div class="post-metadata">

**Author:** ![ryan.stewart](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/ryan.stewart/32/2442_2.png) [@ryan.stewart](https://devforum.okta.com/u/ryan.stewart)\
**Post date:** [February 20, 2020, 12:35am UTC](https://devforum.okta.com/t/list-users-assigned-to-app-returns-status-active-for-all-users/8106/4 "2020-02-20T00:35:14Z")

</div>

To get the actual status of the user you will need to call the users endpoint for each user returned by the app.

{{url}}/api/v1/users/{{user\_id}}

---

<div class="post-metadata">

**Author:** ![ruby](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ruby](https://devforum.okta.com/u/ruby)\
**Post date:** [February 21, 2020, 10:58am UTC](https://devforum.okta.com/t/list-users-assigned-to-app-returns-status-active-for-all-users/8106/5 "2020-02-21T10:58:41Z")

</div>

Thank you Ryan!

Your suggestion definitely would work, but I’m afraid to hit the rate limit. I guess I have no choice.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [August 27, 2021, 5:21pm UTC](https://devforum.okta.com/t/list-users-assigned-to-app-returns-status-active-for-all-users/8106/6 "2021-08-27T17:21:06Z")

</div>

Closed on August 27, 2021, 5:21pm UTC

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