Hello @lawrencerogo,
Thank you for reaching out to us!
The user_id is a unique identifier within Auth0, which is not editable - there can exist multiple users with the same email address in a tenant, but can only even be one user with a specific user_id.
The logic Auth0 uses for creating a user_id - let’s consider a user from an Enterprise Azure AD Connection - would be to take the existing user_id of the user from the AD ( if it has one ) and add to it a prefix of the Connection within Auth0. As an example, an AD sourced user could have it’s user_id ( in the AD ) set to 123abc, but upon importing to Auth0, it could get converted to ad|Test|123abc, where " Test " would be the name of the Connection.
With this out of the way, I believe the only way you can preserve the same user_ids from one tenant to another would be to create a new Azure AD integration in your second tenant with the same local AD ( the same users ), name it the same way as the connection from the first tenant and have the users login naturally through this way.
The following doc could prove useful to see how Auth0 interacts with User Profile Attributes.
Thank you!
Gerald