Issue with /api/v1/users/:id/lifecycle/reset_password

api

#1

I tried to send a user to Recovery state by using the REST api /api/v1/users/:id/lifecycle/reset_password as mentioned in https://developer.okta.com/docs/api/resources/users.html?_ga=2.145315956.1373747306.1515758266-1624124161.1499939374#reset-password.

However, the status retrieved back from /api/v1/users/:id shows status as PROVISIONED.

Is this a bug with the system or is the status Recovery no longer valid?


#2

I just tried this on a user in my test org. The user started as ACTIVE, and after hitting /api/v1/users/:id/lifecycle/reset_password the user status was changed to RECOVERY.

Can you replicate your problem with another user? If so, I’d be curious if

  • The user started as ACTIVE, or some other status?
  • This user is an Okta-mastered user, or is a user from somewhere else (social auth, AD or LDAP, etc)

#3

For a user to go to RECOVERY state, it should be in ACTIVE state first.
If the user is in PROVISIONED state, resetting the password has no effect on his state, as he’s not yet ACTIVE with a password.

Take a look at the user lifecycle here - https://developer.okta.com/docs/api/resources/users.html#user-status


#4

Yes you are correct. The status of user that I tried was in PROVISIONED. I am also able to push user to RECOVERY state now. Thank you.


#5

Glad you got it working! :+1: