# Where to find User ID information

**URL:** <https://meta.discourse.org/t/where-to-find-user-id-information/61701>\
**Category:** Development\
**Created:** [2017 年4 月 27 日 06:11 UTC](https://meta.discourse.org/t/where-to-find-user-id-information/61701 "2017-04-27T06:11:28Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

作者： ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
发布日期： [2017 年4 月 27 日 13:50 UTC](https://meta.discourse.org/t/where-to-find-user-id-information/61701/5 "2017-04-27T13:50:53Z")

</div>

> [@Ranga\_TA](#):
>
> how do we download event or User ID information. Or SSO information from the User details?

You need to write an SQL query for the information you want. To get the user id for all users, enter the following query:

```plaintext
SELECT users.username, users.id
FROM users
ORDER BY id

```

That will sort by user id. If you want to sort by username, replace `ORDER BY id` with `ORDER BY username`.

---

_[View the full topic](https://meta.discourse.org/t/where-to-find-user-id-information/61701)._
