# Add the SSO record external id to UserSerializer

**URL:** https://meta.discourse.org/t/add-the-sso-record-external-id-to-userserializer/60751
**Category:** Development
**Tags:** sso, discourseconnect
**Created:** [April 11, 2017, 2:12am UTC](https://meta.discourse.org/t/add-the-sso-record-external-id-to-userserializer/60751 "2017-04-11T02:12:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [April 11, 2017, 2:12am UTC](https://meta.discourse.org/t/add-the-sso-record-external-id-to-userserializer/60751/1 "2017-04-11T02:12:56Z")

</div>

Could the user’s SSO record `external_id` be added to the `UserSerializer`?

It would be useful for syncing Discourse user data with the SSO provider’s user data through the user event webhook.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 11, 2017, 1:10pm UTC](https://meta.discourse.org/t/add-the-sso-record-external-id-to-userserializer/60751/2 "2017-04-11T13:10:28Z")

</div>

I am not sure, this has security implications, it is not the business of the end user what the external id is.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [April 11, 2017, 1:18pm UTC](https://meta.discourse.org/t/add-the-sso-record-external-id-to-userserializer/60751/3 "2017-04-11T13:18:30Z")

</div>

I’m OK if we add it to

> <https://github.com/discourse/discourse/blob/main/app/serializers/web_hook_user_serializer.rb>

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 5, 2017, 8:27pm UTC](https://meta.discourse.org/t/add-the-sso-record-external-id-to-userserializer/60751/4 "2017-07-05T20:27:37Z")

</div>

I’m working on something now that could use this. Is the best way to get it done to submit a PR?
