Import Users Fails - But don’t know why

Hi,

I have tried to import a user using the bulk import my JSON looks like so:

{
“email”: “person@dummy.net”,
“email_verified” : true,
“user_id” : “1234”,
“password_hash”: “*******”
}

When I use the API explorer I get a job ID.

When I then use this id on:

https://****.eu.auth0.com/api/v2/jobs/job_********

The response I get back is 200
{
“type”: “users_import”,
“status”: “failed”,
“connection_id”: “con_",
“external_id”: “test”,
“connection”: "
",
“created_at”: “2019-09-04T12:55:40.063Z”,
“id”: "job_
*******”
}

When i then use:
https://.eu.auth0.com/api/v2/jobs/job_*****/errors
The response is as follows:
Response Code: 204
Response Body: no content

The 204 error according to the docs means: “The job was retrieved, but no errors were found”

So my question is how can i find out why the job failed so i can find out what has gone wrong?

1 Like

Hey there @anauthuser, welcome to the Auth0 Community!

I wanted to follow up to see if you were still running into issues with importing users?

We were having issues the other day when leveraging the bulk import feature but it has since been resolved. Degraded performance on Bulk User Import feature • Auth0 Status Page

Thank you!

Hi Thank you for you response. I am still having issues. The problem still exists, to add further there is nothing useful in the Auth0 logs.

When you get a chance can you direct message me the tenant name you are working with? Thanks!

Is this failing with all users or a specific subset of users or perhaps a single user? Can you direct message me a sample I can take a look at? Thanks in advance!

I wanted to let you know I followed up with the team today, I’m waiting on a response. Once I hear something I will be sure to share :+1:

Hi @anauthuser. Sorry for the delay coming back to you, these past two weeks have been specially busy.
I inspected the JSON file you provided to Jim. There are a couple of things there:

  • The JSON should be an array of objects, e.g.
[
  {user 1...},
  {user 2...},
  ...
]

In your file you were missing the opening and closing brackets. See the example.
We should definitely be handling this error better (I reproduced the issue and, like you, got no error message). I’ll let our engineering team know about this.

If you fix that and try the importing again this time you will get a message for the next problem:

  • The password hashes supported at this time are bcrypt $2a$ or $2b$ with 10 salt rounds. Yours have 12, so that’s not going work. You might be able to work around this by doing a rehashing to 10 salt rounds when users log in in your current system and keep that transition until all hashes are in the new format. At that point you can migrate the users to Auth0.

Hope that helps.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.