# Expire users pwd on first login

**URL:** <https://devforum.okta.com/t/expire-users-pwd-on-first-login/31835>\
**Category:** Questions\
**Created:** [January 29, 2025, 8:14pm UTC](https://devforum.okta.com/t/expire-users-pwd-on-first-login/31835 "2025-01-29T20:14:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wallacez1](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@wallacez1](https://devforum.okta.com/u/wallacez1)\
**Post date:** [January 29, 2025, 8:14pm UTC](https://devforum.okta.com/t/expire-users-pwd-on-first-login/31835/1 "2025-01-29T20:14:58Z")

</div>

Greetings!

I have a question: we need to assign a temporary custom Okta password for a subset of our users during the onboarding process. Unfortunately, we cannot use the Okta invitation email to set the password. In simple terms, we need to manually set the Okta password, and when the users log in, they will be required to change it.

I’m considering programmatically calling the expire\_password endpoint after creating the account, but that doesn’t seem like the most practical solution. Is there any tool that Okta provides to facilitate this workflow?

Thank you!

---

<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:** [January 30, 2025, 4:41pm UTC](https://devforum.okta.com/t/expire-users-pwd-on-first-login/31835/2 "2025-01-30T16:41:14Z")

</div>

Are you creating the users via API, or within the Admin Console? If via API, what about including the option [`nextLogin=changePassword`](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/User/#tag/User/operation/createUser!in=query&path=nextLogin&t=request) when creating the users?

Otherwise, using the /expire\_password endpoint would make the most sense to me.

---

<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:** [March 1, 2025, 4:41pm UTC](https://devforum.okta.com/t/expire-users-pwd-on-first-login/31835/3 "2025-03-01T16:41:34Z")

</div>

Closed on March 1, 2025, 4:41pm UTC

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