# How to know if user has SSO

**URL:** https://meta.discourse.org/t/how-to-know-if-user-has-sso/238926
**Category:** SSO
**Tags:** rest-api
**Created:** [September 13, 2022, 10:35pm UTC](https://meta.discourse.org/t/how-to-know-if-user-has-sso/238926 "2022-09-13T22:35:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tiagomatosweb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tiagomatosweb/32/273440_2.png) [@tiagomatosweb](https://meta.discourse.org/u/tiagomatosweb)
#### Post date: [September 13, 2022, 10:35pm UTC](https://meta.discourse.org/t/how-to-know-if-user-has-sso/238926/1 "2022-09-13T22:35:47Z")

</div>

Hi,  
I am currently fetching users via API using `admin/users/list/active.json`  
However, I would like to know if a particular user has [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) info.

How would I approach that?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 14, 2022, 12:59am UTC](https://meta.discourse.org/t/how-to-know-if-user-has-sso/238926/2 "2022-09-14T00:59:27Z")

</div>

If you’re using Discourse\_connect then all users are using it, right? Or do you mean oauth?

There is an admin route (and maybe a user preferences) that shows the login info. If you can find it in the ux you can [How to reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576).

---

<div class="post-metadata">

### Author: ![tiagomatosweb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tiagomatosweb/32/273440_2.png) [@tiagomatosweb](https://meta.discourse.org/u/tiagomatosweb)
#### Post date: [September 14, 2022, 6:50am UTC](https://meta.discourse.org/t/how-to-know-if-user-has-sso/238926/3 "2022-09-14T06:50:58Z")

</div>

Oh I was using the `/u/{username}.json` endpoint.  
But doing the reverse engineer I realised that the correct endpoint is `/admin/users/{id}.json`. This endpoint return a field called “single\_sign\_on\_record” which is what I was after.

Cheers, tks @pfaffman

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 30, 2023, 9:17am UTC](https://meta.discourse.org/t/how-to-know-if-user-has-sso/238926/5 "2023-08-30T09:17:46Z")

</div>

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