# When Discourse is an identity provider, does it save the external user IDs?

**URL:** <https://meta.discourse.org/t/when-discourse-is-an-identity-provider-does-it-save-the-external-user-ids/290900>\
**Category:** SSO\
**Tags:** rest-api\
**Created:** [January 8, 2024, 6:56pm UTC](https://meta.discourse.org/t/when-discourse-is-an-identity-provider-does-it-save-the-external-user-ids/290900 "2024-01-08T18:56:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![wilson29thid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wilson29thid/32/173700_2.png) [@wilson29thid](https://meta.discourse.org/u/wilson29thid)\
**Post date:** [January 8, 2024, 6:56pm UTC](https://meta.discourse.org/t/when-discourse-is-an-identity-provider-does-it-save-the-external-user-ids/290900/1 "2024-01-08T18:56:09Z")

</div>

I’m [using Discourse as an identity provider](https://meta.discourse.org/t/use-discourse-as-an-identity-provider-sso-discourseconnect/32974) for my rails application (you sign into my rails app with your discourse login; not the other way around). I’d like to add a link on user profile pages in Discourse to take you to their respective profile on my rails app. In order to do that, Discourse would need to know their user id in my rails application/database.

I know [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) saves ‘external\_id’ when you do it _the other way_ round (sign into discourse with some other login). But does it save anything when it’s this way round?

If not, any advice for storing it?

---

_[View the full topic](https://meta.discourse.org/t/when-discourse-is-an-identity-provider-does-it-save-the-external-user-ids/290900)._
