User Migration w/ Custom DB Forgot Password

When I use Lazy migration from our legacy DB Some users use a password manager or do not know their password. When they click the “forgot password” link this will attempt to search the Auth0 DB. The problem is this is before the user has been migrated and will not be found. What are my options?

Hi @Sigkill9,

Welcome to Auth0 Community!

If a user has not yet migrated and they go to change their password, Auth0 will use the get_user script to find the user and actually create a “semi-migrated” profile for them with the new password. When they then log in with the new password, they fully migrated profile will be created for the user account. Here is a link to another community post with a more detailed explanation of this process: Custom Database with automatic migration -> resetting password for un-migrated users - #7 by thameera

Hope this helps!

Thanks,
Dave

1 Like

Thank you very much for your response. Is there a way to see these “semi-migrated” user account data?

Thanks again,

Jerry

Hi Jerry,

Unfortunately if the user has not logged in yet after changing their password, the temporary profile will not be visible or searchable, though if you try to create a new user with the same username you will see a “User already exists” error due to the temporary profile. This scenario is covered in more detail on this community post from another member of our team: "User already exists" error when trying to create a user

1 Like

Hello David,
I now understand how the process works.
I am also unable to retrieve users based on internal “username” instead of email in the same circumstance. I have written a DB action script “getUser” that I want to grab the user by “username” then send an email from the retrieved profile. The login which shows “username” tries to send the email to the username and not the retrieved email address. is it possible to do this?

Hi Jerry,

I think I might need a bit more information about your use case, and sending an email from an action script in particular. Could you explain a bit more about the intent of the email and when you would expect a user to go through this process?

1 Like

David,
I figured it out. It was on my side.
Thanks again for all the help!

-Jerry

1 Like

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