# Importing users from custom DB

**URL:** <https://community.auth0.com/t/importing-users-from-custom-db/9798>\
**Category:** Get Help\
**Tags:** custom-database, migrate-users\
**Created:** [March 6, 2018, 4:52pm UTC](https://community.auth0.com/t/importing-users-from-custom-db/9798 "2018-03-06T16:52:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![floppy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/floppy/32/3962_2.png) [@floppy](https://community.auth0.com/u/floppy)\
**Post date:** [March 6, 2018, 4:52pm UTC](https://community.auth0.com/t/importing-users-from-custom-db/9798/1 "2018-03-06T16:52:48Z")

</div>

We have a load of users in our old custom DB who have not yet set a password, so I would like to bulk-import them into Auth0 rather than waiting for the automatic migration to take place (which we have working nicely).

However, when I try to create those users through the API, Auth0 checks the custom DB, sees they are already there, and stops the creation - understandably. I’m using the wp-auth0 plugin, so I don’t have a lot of control over the other end of the custom DB scripts, otherwise I could of course change things at that end.

What I’m wondering is, when are the different scripts used? The `login` script is used for logging in, obviously, but how about `get-user`? Is that only used to look up if a user already exists?

If so, I could temporarily disable that script to remove the disambiguation check while I run the import. Does that make sense? Are there dangers in that approach?

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [March 7, 2018, 6:52pm UTC](https://community.auth0.com/t/importing-users-from-custom-db/9798/2 "2018-03-07T18:52:52Z")

</div>

When you say that your users do not have a password, is this in WordPress?

As for the when the Get User [action script](https://auth0.com/docs/users/migrations/automatic#3-configure-the-database-action-scripts) is used, it executes after any of these actions:

- A user attempts to sign-up
- A user clicks on a valid password change confirmation link
- The management API receives a call to the update a user’s email or username endpoint.

You can’t disable the script per se, but you can make the script not do anything (so in a sense disabling it). At which point, you could run the import.

---

<div class="post-metadata">

**Author:** ![floppy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/floppy/32/3962_2.png) [@floppy](https://community.auth0.com/u/floppy)\
**Post date:** [March 20, 2018, 7:22pm UTC](https://community.auth0.com/t/importing-users-from-custom-db/9798/3 "2018-03-20T19:22:13Z")

</div>

They have a password in Wordpress, but haven’t yet gone through Auth0, so aren’t migrated.

I’ve realised that the user import function can help with this; it doesn’t seem to check with the custom DB at all, so I can import some of the data that way, without affecting the custom DB scripts. However, that can’t import all user data, so I need to import a user, then update it to set the rest of the information.

Any other thoughts to make this process easier would be much appreciated!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 25, 2019, 11:09am UTC](https://community.auth0.com/t/importing-users-from-custom-db/9798/4 "2019-07-25T11:09:56Z")

</div>


