# Need to Update in OKTA a User's Password using a new Hash (SHA-512) Password

**URL:** <https://devforum.okta.com/t/need-to-update-in-okta-a-users-password-using-a-new-hash-sha-512-password/13703>\
**Category:** Questions\
**Created:** [April 8, 2021, 4:36pm UTC](https://devforum.okta.com/t/need-to-update-in-okta-a-users-password-using-a-new-hash-sha-512-password/13703 "2021-04-08T16:36:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LuisaM](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@LuisaM](https://devforum.okta.com/u/LuisaM)\
**Post date:** [April 8, 2021, 4:36pm UTC](https://devforum.okta.com/t/need-to-update-in-okta-a-users-password-using-a-new-hash-sha-512-password/13703/1 "2021-04-08T16:36:47Z")

</div>

Hi everyone,

I need to update a user’s password in OKTA with a new one that is in Hash (SHA-512) format.  
I am using this class in my MVC core code ChangePasswordAsync  
But getting error below:  
Api validation failed: hash (400, E0000001): hash: An imported password cannot be specified for this operation  
Doing some investigation, ;it’s supposed that the status of the user should be in “STAGED”  
Questions:

1. How to change the status of the user to “STAGED” through my .net code?
2. Is there another solution for the error above?

Really appreciated any reply, thanks

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [April 8, 2021, 5:10pm UTC](https://devforum.okta.com/t/need-to-update-in-okta-a-users-password-using-a-new-hash-sha-512-password/13703/2 "2021-04-08T17:10:00Z")

</div>

Setting a hashed password as a user’s credentials was only designed to work for newly migrated users and was thus only designed to work if the user had not yet been activated and is either [being created](https://developer.okta.com/docs/reference/api/users/#create-user-with-imported-hashed-password) or is being updated while still in the [STAGED status](https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-end-user-states.htm). As soon as a user has been activated, they can no longer be set to STAGED.

If you have a use case that requires you to set their passwords after they have already been activated, this will require a feature request on our side to support this flow. You can submit a feature request on [our Okta Ideas portal](https://support.okta.com/help/s/article/Okta-Ideas-Overview-FAQ?language=en_US).

---

<div class="post-metadata">

**Author:** ![LuisaM](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@LuisaM](https://devforum.okta.com/u/LuisaM)\
**Post date:** [April 8, 2021, 7:31pm UTC](https://devforum.okta.com/t/need-to-update-in-okta-a-users-password-using-a-new-hash-sha-512-password/13703/3 "2021-04-08T19:31:12Z")

</div>

Thank you Andrea for your quicl reply

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [April 9, 2021, 7:31pm UTC](https://devforum.okta.com/t/need-to-update-in-okta-a-users-password-using-a-new-hash-sha-512-password/13703/4 "2021-04-09T19:31:54Z")

</div>

Closed on April 9, 2021, 7:31pm UTC

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