Change password, new hashed password

I am trying to change password for a user created with hashed passowrd,
the new password needs to be also hassed, this is what I am sending to okta

{
“oldPassword”:{
“value”:“TestPassowrd123!”
},
“newPassword”:{
“hash”:{
“algorithm”:“BCRYPT”,
“workFactor”:10,
“salt”:“5vhGTkpaYc0YbDorS1q8ge”,
“value”:".1fLWBBk36qpdiUJ5iM1BEzaJaXC4cE"
}
}
}

But I am getting this response

{
“errorCode”: “E0000001”,
“errorSummary”: “Api validation failed: hash”,
“errorLink”: “E0000001”,
“errorId”: “psrAjYC2qCqSTurdPkoBxBtGW”,
“errorCauses”: [
{
“errorSummary”: “hash: An imported password cannot be specified for this operation”
}
]
}

Please Help

It seems the users needs to be in STAGED state for the api method with password hash to work

Thank you for replying,

I am using /users/{user ID}/credentials/change_password

In api documentation is mentioned that this can be performed in stages, active, password expired or recovery status

How do you get the user id? I am using okta auth js

Hello,
Please open a new forum post detailing what you are trying to do and the issues you are seeing.

1 Like