# Is it possible to sort a user list query for last\_login\_time?

**URL:** <https://devforum.zoom.us/t/is-it-possible-to-sort-a-user-list-query-for-last-login-time/77556>\
**Category:** API and Webhooks\
**Created:** [October 18, 2022, 3:37pm UTC](https://devforum.zoom.us/t/is-it-possible-to-sort-a-user-list-query-for-last-login-time/77556 "2022-10-18T15:37:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aconsunji](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@aconsunji](https://devforum.zoom.us/u/aconsunji)\
**Post date:** [October 18, 2022, 3:37pm UTC](https://devforum.zoom.us/t/is-it-possible-to-sort-a-user-list-query-for-last-login-time/77556/1 "2022-10-18T15:37:01Z")

</div>

Hi Team, my apologies in advance as I’m very new to this. Hopefully I’m reaching out to the correct channel.

**Description**  
I was looking to sort my query result with last login time to see if I can get all users that has not logged-in for more than 90 days.

**Error?**  
No error, it just gives me unfiltered results

**How To Reproduce**  
_Steps to reproduce the behavior:_  
Running [https://api.zoom.us/v2/users](https://api.zoom.us/v2/users) on postman, tried [https://api.zoom.us/v2/users?last\_login\_time=“2022-10-13T21:38:25Z”](https://api.zoom.us/v2/users?last_login_time=%222022-10-13T21:38:25Z%22) using JWT token

---

<div class="post-metadata">

**Author:** ![brandon.abajelo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brandon.abajelo/32/39183_2.png) [@brandon.abajelo](https://devforum.zoom.us/u/brandon.abajelo)\
**Post date:** [October 18, 2022, 3:58pm UTC](https://devforum.zoom.us/t/is-it-possible-to-sort-a-user-list-query-for-last-login-time/77556/2 "2022-10-18T15:58:10Z")

</div>

@aconsunji I don’t believe we have query parameters to sort the request by login time. However, last\_login\_time is a field returned by the api so you could easily sort the result once you fetch it.

---

<div class="post-metadata">

**Author:** ![aconsunji](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@aconsunji](https://devforum.zoom.us/u/aconsunji)\
**Post date:** [October 18, 2022, 4:18pm UTC](https://devforum.zoom.us/t/is-it-possible-to-sort-a-user-list-query-for-last-login-time/77556/3 "2022-10-18T16:18:46Z")

</div>

Thank you Brandon! Can I at least make a query for licensed users?

---

<div class="post-metadata">

**Author:** ![brandon.abajelo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brandon.abajelo/32/39183_2.png) [@brandon.abajelo](https://devforum.zoom.us/u/brandon.abajelo)\
**Post date:** [October 18, 2022, 4:46pm UTC](https://devforum.zoom.us/t/is-it-possible-to-sort-a-user-list-query-for-last-login-time/77556/4 "2022-10-18T16:46:13Z")

</div>

@aconsunji for the list users endpoint, you can filter on user status (active, inactive, pending) or role id. We have a [get user summary](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/userSummary) API to check how many licensed/unlicensed users you have in your account.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 22, 2023, 8:22am UTC](https://devforum.zoom.us/t/is-it-possible-to-sort-a-user-list-query-for-last-login-time/77556/5 "2023-10-22T08:22:52Z")

</div>

Closed on October 22, 2023, 8:22am UTC

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