Bulk Import Users, get users that was not imported

Hello
When i import users with a JSON file, i get the status of that job ( with an ID … ), is that mean that all users was imported ? if not, how can i get the users that was not imported from that file.

Thank you.

@bechirlahmer2 When you retrieve the details of a completed job from the Management API, there is a summary object that shows you how many users failed to import.

For example:

  "status": "completed",
  "type": "users_import",
  "created_at": "",
  "id": "job_abc123",
  "connection_id": "CONNECTION_ID",
  "external_id": "EXTERNAL_ID",
  "location": "https://YOUR_DOMAIN/EXAMPLE",
  "summary": {
    "failed": 0, <--- ** HERE IS NUMBER OF USERS WHO FAILED TO BULK IMPORT
    "updated": 0,
    "inserted": 1,
    "total": 1
  }
}

To get the details of the failed users, you can use the /api/v2/jobs/{id}/errors endpoint with the Job ID.

More info in this documentation
https://auth0.com/docs/manage-users/user-migration/bulk-user-imports#retrieve-failed-entries

2 Likes

Teamwork makes the dreamwork!