User Import Fails with Error: "Error in passwordHash Property - String does not Match Pattern"

Overview

We ran a bulk import of user data using Create import users job(/api/v2/jobs/users-imports). We have completed an Import Job with success, but some of the data has errors. One error we are seeing is "Error in passwordHash property - String does not match pattern ^\\$2[ab]?\\$10+\\$[./A-Za-z0-9]{53}$". How can we resolve this error.

Applies To
  • Password Hash 
  • Format Property 
  • Pattern Import
Cause
The error message "Error in passwordHash property - String does not match pattern ^\\$2[ab]?\\$10+\\$[./A-Za-z0-9]{53}$", is indicating that the password_hash value for a user did not pass a regex validation. 
Solution
Per the JSON user schema for imports the password_hash must be a string and should be hashed using bcrypt $2a$ or $2b$ and have 10 saltRounds: https://auth0.com/docs/manage-users/user-migration/bulk-user-import-database-schema-and-examples#user-json-schema
"password_hash": {
	"type": "string",
	"description": "Hashed password for the user. Passwords should be hashed using bcrypt $2a$ or $2b$ and have 10 saltRounds."
}
 

Recommended content

No recommended content found...