Using Two Database Connections with the Same User

Hello @himashya.fonseka,

Thank you for reaching out to us!
I did some testing on this by exporting the users from one DB using the Create export users job, editing the users data from the json file and then importing the json file to a separate DB. This allowed me to essentially have 2 sets of users, with the same user_id, in the same tenant, but comparing the two profiles of one user, both of them were linked to my first DB when I looked under the Identities field. It was expected for something to break along the line, as the user_id is a defining attribute and it’s not allowed to have multiples.

However, this can be accomplished by using multiple tenants, if this fits your usecase. As long as the application can access both DBs that are on different tenants, it will have access to two sets of users with the same user_id. You will just need to export the users from one DB, setup a second DB on a different tenant and import the users.

You can find more information on our Bulk User Imports documentation.

Thank you!
Gerald

1 Like