Custom database connection stops working when enabling automatic user migration

I set up a custom database connection and wrote the login and get user scripts. I tried them out and they ran successfully. Then I used the “Try Connection” feature. This also worked.

Now when I enable the Automatic migration option in this custom db connection. The “Try connection” returns “Wrong email or password”. Same result in our asp.net mvc application.

To be clear, the goal is to gradually migrate our existing users (now in sql server) to Auth0.
So: Automatic migration enabled = try connection doesn’t work anymore.

Hi @jan.vanhoye

Turn on the realtime webtask log extension and put some console.log statements in.
That should help.

At a guess, you are entering an email that exists in Auth0 so the script is not being invoked.

John

1 Like

Hi @john.gateley

Where exactly do you want me to put the log statements? The login and get user scripts are working as expected. The email already existing in Auth0 is also not the case. The logging when executing the try connection while automatic migration is turned on looks like this:

Anything else we might have been missing?

Hi @jan.vanhoye

Something is different when you do “try connection” vs using the connection from an application sign-in, right? Put in some log statements to try to figure out what is different, why it works in the one scenario but not the other. Run both scenarios and do a side by side comparison of the log output.

John

1 Like

Hi @john.gateley

No there is not :slight_smile:
On enabling the “import userst to Auth0” setting of my custom db, the try connection functionality stops working. The logging looks identical. When turning the option off, everything works as expected. I’m sure to use new users everytime I test. (so they don’t already exist in auth0).

Thanks for the support
Jan

Hi @jan.vanhoye

Can you try with import uses turned on, but using a real application instead of the “try connection”?

What is the error in the tenant logs when using “Try Connection” and import users turned on?

John

1 Like