userId and schema for bulk import

I was moving users from old tenant to new tenant.
My have issue the userId is getting updated in new tenant and could not retain the schema of JSON.
I was using import/export user plugin. Please let me know best way to proceed for this.


Hi @abhamidipati, specifying a user_id in a bulk import is not currently supported (hence why it is not documented in our Bulk Import Database Schema documentation).

If you’d like to import users and preserve their user ID’s, you can use a Custom Database connection, where you can set the user_id in the returned user profile from the Login script.

Thanks @prashantT for the reply.

Is there option to import the app_metadata from the database connection?

1 Like

Yes, you can set metadata in the JSON object of the user profile that is being returned to the callback.

Note: the property should be called metadata, rather than app_metadata when setting app_metadata the custom database script. See (3) in the custom db script documentation for more information.

Hi @prashantT,

I have a similar requirement to preserve a custom database user_id during migration to Auth0.

While users are migrated to custom database using login/getUser scripts I can set custom user_id - no problems here.

However after cut-over date I need to migrate the rest of users using “Bulk Migration” and also preserve their custom user_ids.

The database is going to be the same, I’m just going to change return for both functions to callback(null,null).

What is the recommended way for “Bulk Migration” to custom database in that case (preserving custom user_id)?


Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?