Last Updated: Oct 17, 2024
Overview
This article describes how to do a Bulk User Import using the Management API and the User Import / Export extension.
Solution
Follow the steps or video below:
Prerequisites
- Create a database connection or use an existing one. Make sure the connection is enabled for at least one application.
- Create a JSON file that contains an array of objects, each representing a user. Check the Database Schema. NOTE: Check that every user property is written correctly, using lowercase, uppercase, underscores, etc. Writing the properties badly will lead to errors in the import, saying the JSON file is invalid, as in the following screenshot.
- If password hashes are imported, make sure the algorithm is supported. Users with passwords hashed by unsupported algorithms will need to reset their password when they log in for the first time after the bulk import. Password hashes must be requested through the Support Center.
- If importing with the Management API, Get a Management API token for job endpoint requests.
The Auth0 import job allows the import of the user ID. In this step, it is important to point out that every user ID in the tenant must be unique .
Imagine the following scenario: Users are being imported with user_id included, but another database in the tenant already has the same user_id for one of the users. This is a known scenario where the user needs to be updated, but since the Update a User endpoint only asks for the user_id, the update will apply to the first user the call finds, and it may not be the intended user for the update.