Import Okta Users With BCrypt Hashed Passwords via API
Last Updated:
Overview
Administrators can import users with BCrypt hashed passwords into Okta by leveraging API calls. Configuring the Postman application and executing the create user endpoint with the hashed password parameters successfully imports the users and sets their status to active.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Users API
- BCrypt
- Hash Import
Solution
How are users with BCrypt hashed passwords imported via the Okta API?
Import users with BCrypt hashed passwords by configuring the Postman environment, preparing the API request with the required hash parameters, and executing the call to create the user.
- Set up the Postman application as described in the Test the Okta REST APIs using Postman article.
- Import the Okta Public Postman API Collections to the environment.
- Prepare the Create User with imported hashed password API call. Execute the call with the
?activate=trueparameter or execute a subsequent Activate user call to place the user in anActivestate. - Select Send to execute the API call. A successful request returns a 200 SUCCESS response along with a schema of the user properties.
Review the following syntax example detailing the breakdown of elements used in the BCrypt hash and the corresponding API request body.
Username: hashimport@hashimport.xyz
Password: P@ssword123456
Full Hash: $2a$10$qRRx8rli7Lvs2h2CNgCQ2OmVA2NDdomRGoGFrAXDZcno0OZ6CoOU2
Algorithm and Rounds of encryption: $2a$10$
22 extracted Salt from the Hash above after the Algorithm/Rounds: qRRx8rli7Lvs2h2CNgCQ2O
{
"profile": {
"firstName": "Isaac",
"lastName": "Brock",
"email": "hashimport@hashimport.xyz",
"login": "hashimport@hashimport.xyz",
"mobilePhone": "555-666-1337"
},
"credentials": {
"password" : {
"hash": {
"algorithm": "BCRYPT",
"workFactor": 10,
"salt": "qRRx8rli7Lvs2h2CNgCQ2O",
"value": "mVA2NDdomRGoGFrAXDZcno0OZ6CoOU2"
}
}
}
}
