# Link SSO accounts with already exist accounts

**URL:** <https://community.auth0.com/t/link-sso-accounts-with-already-exist-accounts/77760>\
**Category:** Get Help\
**Tags:** account-linking, sso, connections\
**Created:** [February 6, 2022, 2:11pm UTC](https://community.auth0.com/t/link-sso-accounts-with-already-exist-accounts/77760 "2022-02-06T14:11:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexeyf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alexeyf/32/34621_2.png) [@alexeyf](https://community.auth0.com/u/alexeyf)\
**Post date:** [February 6, 2022, 2:11pm UTC](https://community.auth0.com/t/link-sso-accounts-with-already-exist-accounts/77760/1 "2022-02-06T14:11:18Z")

</div>

Hi Auth0 Community!  
I have a question about linking regular accounts with SSO accounts.  
For example, I had an auth0 application with a regular database connection and now I want to provide for users SSO.  
What is the right way to link old accounts with new ones that will create when users will log in through SSO?  
I tried to use `auth0-account-link` extension but it has the part where the system suggests to user linking accounts. For me, this part is not necessary, I want to link accounts without confirmation.  
[Here](https://auth0.com/docs/manage-users/user-accounts/user-account-linking/link-user-accounts) I found that I can use [Management API](https://auth0.com/docs/manage-users/user-accounts/user-account-linking/link-user-accounts#mgmt-api) but I do not understand when and how I should do it, because I need that user already is linked at the moment of redirection to my SPA application.

Summary:

1. What is the right way to link existing accounts with new SSO accounts?
2. if I can use `auth0-account-link` extension how to do it **without** any extra users actions?
3. If I need to use Management API is there an example of how to do it?

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![alexeyf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alexeyf/32/34621_2.png) [@alexeyf](https://community.auth0.com/u/alexeyf)\
**Post date:** [February 6, 2022, 5:13pm UTC](https://community.auth0.com/t/link-sso-accounts-with-already-exist-accounts/77760/2 "2022-02-06T17:13:21Z")

</div>

I found that there is a way to link accounts through actions. Will move this way.

> [@Account linking through Actions](https://community.auth0.com/t/account-linking-through-actions/68940):
>
> Hi, lately I’ve been struggling with simple email account linking. I’ve tried the “Account Linking Extension”, but it turned out not to be an option for my use case, because it requires the user to manually confirm the linking though the UI. Then I tried to use actions (specifically the “Post login” flow) and it indeed links accounts with the same email addresses, but then it returns the original user id. For example: I sign in with GitHub (github|...) I sign out I sign in again in with use…

> [@Account linking using Action during Post User Registration](https://community.auth0.com/t/account-linking-using-action-during-post-user-registration/73019):
>
> Hi everyone, I’m trying to implement a seamless account linking routine, but still without success, although I’ve found some success stories from the community like the one from [Alexab](https://community.auth0.com/t/account-linking-with-auth0-actions/60676). I’m doing the whole process using an Action during [Post User Registration flow](https://auth0.com/docs/actions/triggers/post-user-registration), and the code can be consulted in [this repository](https://github.com/willianantunes/auth0-custom-universal-login) on GitHub. I wrote [this integration test](https://github.com/willianantunes/auth0-custom-universal-login/blob/4631141e6f4b56d13ac23c120ad383daaafa44a8/tests/src/actions/action-post-user-registration-account-linking.spec.test.js#L19-L71), and I could manually assert that the logic was working as expected. To test it manually, I created two users with the same email address, the…

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 7, 2022, 10:38am UTC](https://community.auth0.com/t/link-sso-accounts-with-already-exist-accounts/77760/3 "2022-02-07T10:38:01Z")

</div>

Perfect! Thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 22, 2022, 10:38am UTC](https://community.auth0.com/t/link-sso-accounts-with-already-exist-accounts/77760/4 "2022-02-22T10:38:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 25, 2022, 5:07pm UTC](https://community.auth0.com/t/link-sso-accounts-with-already-exist-accounts/77760/5 "2022-02-25T17:07:18Z")

</div>


