Link users by email rule - THE USER DOES NOT EXIST

Hi, we added the rule to automatic account linking by email.
Problem is that after linking, the first login returns an error that THE USER DOES NOT EXIST.

However linking is successful, and the second login works fine - the user is signed in as the first, primary user, as expected.

I was able to find a workaround on this, changed line 56 from
callback(null, user, context);
callback(null, originalUser, context);

Is my workaround correct or not? Can’t understand why seems nobody else faced with this issue…


Hey there @yevhen.voroniuk, welcome to the Auth0 Community!

I’d like to help with what you are facing. When you get a chance can you direct message me the tenant you are working with along with recording a har file of the broken flow, be sure to select “Preserve log” to catch redirects and scrub the file of user passwords before passing it over. Thanks in advance!


I’m seeing the same error on our production site over the last couple of days. Users logging in with a SAML connection, and trying to link with a Username-Password-Authentication user.

In the logs I see:

“error”: {
“message”: “The user does not exist.”,
“oauthError”: “access_denied”,
“type”: “oauth-authorization”

Hi - I’m seeing the same issue (linking a SAML user with a database user). Did you work out what was happening?

Hi @monkeyson, is this with one particular user or multiple users? When you get a chance can you replicate the issue while recording a HAR file? Please be sure to select “Preserve log” to catch redirects and scrub the file of user passwords and then direct message it over to me? Thanks you.

Ok. Will try to record this HAR file, but it’s strange for me, that you can’t reproduce it by yourself. Scenario seems clear.

See attached HAR file.

The recording is started from the moment when we try to login using google account with an email, which is already present in auth0, from db connection.

Having reviewed the HAR file you sent over, I didn’t see anything that gives me pause. I will continue to investigate and let you know what I find as I progress forward.

I wanted to follow up on this subject and see if you are still experiencing this challenge? Thanks in advance!

After implementing a workaround, mentioned in the start message all is Ok… Do you want me to check again?

@yevhen.voroniuk I apologize for the delay, can you share through a direction message with me the current rule you updated so I can build out this under my test tenant? Thanks in advance!

I have come across the same problem, now implemented @yevhen.voroniuk’s workaround and the issue seems to be resolved for me too.

@James.Morrison can you contact me too if there is another solution/ auth0 update to fix this .

1 Like

Sounds great Kelsey! I am currently looking into this and will include you in the update when I have it :+1:

After working together with another engineer @yevhen.voroniuk and @kelsey1 we haven’t been able to recreate this.

What browser are you using and SDK @yevhen.voroniuk?

@kelsey can you snag a HAR file along with your tenant and send it over to me in a direct message with the broken workflow?

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