Last updated: Dec 10, 2024
Overview
This article provides the steps and endpoints required to migrate users from one database connection to another database connection, including the following information:
- User profile data, including email, email_verified, app_metadata, user_metadata and etc
- User password hash
- User’s assigned permissions
Applies To
- Migrating users
- Password Hash
Solution
While there is not a single endpoint that can import or export this information, the following steps provide a way to export and import them in detail.
- Export
- Use the Bulk User Export feature to export this information: user profile data, including email, email_verified, app_metadata, user_metadata and etc
- Specify which fields of the user profile to export, but please note that it is only possible to export in JSON format to export a user profile field that is an object (e.g. user_metadata) or an array (e.g. identities).
- User Password Hash: The user password hash can only be exported by Auth0 via a support ticket.
- User’s assigned permission
- Export the user’s assigned roles via the Get Users Permission API endpoint
- Import
- Combine the user profile data and the user password hash into one JSON file and import them together:
- User’s assigned permissions
- Use the Assign Permissions to a User management API endpoint to import the user’s assigned permissions