# Unable to expire password when creating users with hash password credentials

**URL:** <https://devforum.okta.com/t/unable-to-expire-password-when-creating-users-with-hash-password-credentials/11608>\
**Category:** Questions\
**Created:** [November 4, 2020, 8:14am UTC](https://devforum.okta.com/t/unable-to-expire-password-when-creating-users-with-hash-password-credentials/11608 "2020-11-04T08:14:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DEVE](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@DEVE](https://devforum.okta.com/u/DEVE)\
**Post date:** [November 4, 2020, 8:14am UTC](https://devforum.okta.com/t/unable-to-expire-password-when-creating-users-with-hash-password-credentials/11608/1 "2020-11-04T08:14:31Z")

</div>

Hi,  
We try to import users with hashed passwords including nextLogin=changePassword but it results with this exception E000124  
{  
“errorCode”: “E0000124”,  
“errorSummary”: “Could not create user. To create a user and expire their password immediately, a password must be specified”,  
“errorLink”: “E0000124”,  
“errorId”: “oaeJNU7p6gJTriXMPIKc483gg”,  
“errorCauses”: [  
{  
“errorSummary”: “Could not create user. To create a user and expire their password immediately, a password must be specified”  
}  
]  
}  
How to create users with imported password and set it as expired with one call API ?  
Thanks

---

<div class="post-metadata">

**Author:** ![gpadma](https://avatars.discourse-cdn.com/v4/letter/g/858c86/32.png) [@gpadma](https://devforum.okta.com/u/gpadma)\
**Post date:** [November 4, 2020, 6:34pm UTC](https://devforum.okta.com/t/unable-to-expire-password-when-creating-users-with-hash-password-credentials/11608/2 "2020-11-04T18:34:07Z")

</div>

@DEVE It doesn’t seem to be supported.

Does creating the user with imported password and then using [expire\_password](https://developer.okta.com/docs/reference/api/users/#expire-password) api to expire the user’s password work for you ?

---

<div class="post-metadata">

**Author:** ![DEVE](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@DEVE](https://devforum.okta.com/u/DEVE)\
**Post date:** [November 5, 2020, 8:15am UTC](https://devforum.okta.com/t/unable-to-expire-password-when-creating-users-with-hash-password-credentials/11608/3 "2020-11-05T08:15:22Z")

</div>

Yes, but it’s supported for creation with simple password !!

Yes this solution works but the problem here, spend a more significant time to migrate users, for example instead of 3H we are on 6H.

Otherwise, for the moment I think the unique solution is to proceed with 2 API calls.

Thank you.

---

<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:** [January 25, 2024, 1:23am UTC](https://devforum.okta.com/t/unable-to-expire-password-when-creating-users-with-hash-password-credentials/11608/4 "2024-01-25T01:23:16Z")

</div>

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