Last Updated: Oct 23, 2024
Overview
This article explains how to bulk update user profile details such as user_metadata and profile_metadata using the Auth0 Management API and Postman.
Applies To
- Update users
- Management API
Solution
Follow the steps or video below.
It is possible to bulk import users’ details with Upsert mode turned on.
This article explains the user import schema and the fields that can be bulk imported:
Steps:
- Bulk export user details in JSON format using this extension: User Import / Export Extension.
- Make changes to the export file.
- Import the users with the extension or by calling the /api/v2/jobs/users-imports endpoint in the Auth0 Management API dashboard or Postman.
- Verify the job is successful and the number of records is updated with the /api/v2/jobs/{id} endpoint.
- Check on the Auth0 Dashboard users’ details to confirm the change.
NOTE:
- To migrate users between databases, export them from one connection and then import them to another connection by using the User import/export extension.
- Please test with a few users first to verify the result before bulk update.
- The user id should have the format of connection|id. It is unique in the Auth0 environment. The update will fail if the same user id exists in multiple connections.
- The name of the field in the import file should be the name added in the User Attribute when exporting user details from the extension.
- When bulk exporting user details, include the email because that’s the key used for updating the user details.
- Bulk import passwordless users are not supported. It is possible to import one user at a time with Auth0 Management API
- The user_metadata object is replaced on upsert with bulk import. To not lose existing fields, send the full user_metadata object when importing.
- It is not possible to bulk-block users. It can only be done by this endpoint for each user: Auth0 Management API