How to do a Bulk User Import

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:

To transfer users from one Auth0 tenant to another, two primary methods exist:

  1. Management API: Management API: Before proceeding with the user import, ensure the Prerequisites are met. Create a user import job by sending a POST /api/v2/jobs/users-imports Management API endpoint. This method requires user data to be prepared in the correct format beforehand. For specific data structure requirements and examples, refer to the Bulk User Import Database Schema and Examples documentation.
  2. User Import/Export Extension: This extension offers an integrated solution, capable of both exporting users from the source tenant and importing them into the destination tenant. Consult the User Import / Export Extension documentation for specific instructions.

NOTE:

  • Ensure all user properties in the JSON file are written with the correct casing and format (e.g., lowercase, uppercase, underscores). Incorrectly formatted properties can lead to import errors, such as an invalid JSON file message.

  • If user_id values are included in the import data:
    • Each user_id must be unique within the tenant.
    • NOTE: If a user_id in the import file already exists for a user in another database within the same tenant, update operations targeting that user_id may affect the existing user record instead of the intended imported user. The Update a User endpoint identifies users solely by user_id.

When importing password hashes:

  • Verify that the hashing algorithm is one of the Supported hash algorithms. Users whose passwords are hashed with unsupported algorithms will be required to reset their password upon their first login after the import.
  • Password hashes can be obtained by submitting a request to the Support Center.

Refer to the Filter example on how to export and filter existing users.