# Is it possible to change users SSO's external\_id after a DB migration?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-change-users-ssos-external-id-after-a-db-migration/62099>\
**Category:** Product Support\
**Created:** [May 4, 2017, 10:57am UTC](https://meta.discourse.org/t/is-it-possible-to-change-users-ssos-external-id-after-a-db-migration/62099 "2017-05-04T10:57:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [June 1, 2019, 7:39pm UTC](https://meta.discourse.org/t/is-it-possible-to-change-users-ssos-external-id-after-a-db-migration/62099/5 "2019-06-01T19:39:55Z")

</div>

The `external_id` saved to the `single_sign_on_records` table. You can delete all records from this table by entering the rails console and running

```ruby
SingleSignOnRecord.destroy_all

```

As long as you are not setting `require_activation` to `true` in the SSO payload, after deleting your site’s SSO records, new SSO records will be created for your users based on their email address when they login with SSO.

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-change-users-ssos-external-id-after-a-db-migration/62099)._
