Merging Identities from Database Connections on First Login


We are using multiple database connections and have set up account merging, but we want to do something more proactive. On the first login to any of them, we want to have a rule that fetches the users profiles from the other possible database connections and adds them as an identity to the initial login.

I have retrieved all the IDs and profile information from the connections I want to add, but I cannot add the identities to the user because “linking to an inexistent identity is not allowed”. I have tried creating the user on the connection so that I can link them, but it fails due to “The user already exists”, presumably because the user does actually exist in the legacy database, but has not signed in and moved over that specific account to auth0.

It seems like we’re in this weird spot where we can’t link database connection identities with the API, and they will only be merged when the user eventually logs in, any suggestions?

Ryan Jansen

1 Like