# SSO Overwrites Admin User

**URL:** https://meta.discourse.org/t/sso-overwrites-admin-user/84691
**Category:** SSO
**Created:** [April 6, 2018, 4:43am UTC](https://meta.discourse.org/t/sso-overwrites-admin-user/84691 "2018-04-06T04:43:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nopsled](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nopsled/32/120092_2.png) [@Nopsled](https://meta.discourse.org/u/Nopsled)
#### Post date: [April 6, 2018, 4:43am UTC](https://meta.discourse.org/t/sso-overwrites-admin-user/84691/1 "2018-04-06T04:43:53Z")

</div>

Hey All,

Got SSO setup and running. It works great when using my first user account (admin user) on the site. It logs in as that user as expected. However, when I try logging in (through SSO) as another user (different ID, Username, Email), it overwrites (or deletes) the previous user with the new one.

Same thing happens if I log out of that user and log in with the previous one. Still only one user account on Discourse.

Any clue what could be going on there?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 6, 2018, 5:13am UTC](https://meta.discourse.org/t/sso-overwrites-admin-user/84691/2 "2018-04-06T05:13:48Z")

</div>

This usually implies something is broken in your SSO implementation.

---

<div class="post-metadata">

### Author: ![Nopsled](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nopsled/32/120092_2.png) [@Nopsled](https://meta.discourse.org/u/Nopsled)
#### Post date: [April 6, 2018, 5:20am UTC](https://meta.discourse.org/t/sso-overwrites-admin-user/84691/3 "2018-04-06T05:20:28Z")

</div>

Yep good call. I just got it figured out and logged back here to post a reply. The external\_id was getting passed an object (database ID). I converted it to a String and all worked as expected.

Thanks!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 6, 2018, 5:32am UTC](https://meta.discourse.org/t/sso-overwrites-admin-user/84691/4 "2018-04-06T05:32:01Z")

</div>


