<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Create Users via API Calls with Expired Passwords
Lifecycle Management
Okta Classic Engine
Okta Identity Engine
Overview

To successfully create users and expire their passwords through API calls, a specific procedure must be adhered to.

NOTE: This is just an example of utilizing the POSTMAN API client to make changes using Okta API. Please use these at an Admin's own risk, as the steps could change if Postman implements any changes to their product. All instructions are provided as is without warranty of any kind. Okta disclaims all implied warranties, including, without limitation, any implied warranties of fitness for a particular purpose. It is highly recommended to test the instructions below in a test/preview environment if possible.

Applies To
  • API
  • User Creation
Solution

Prerequisites


For a user to be created and have its password expired, the user should be created first with a password and, on a subsequent call, have its password expired.

To achieve this, the following procedure is in place:

  1. Set up the Postman app as described in the Test the Okta REST APIs using Postman article.

  2. Import the Okta Users Collection found on the Okta Users API Collection Okta developer page.

  3. Prepare the Create user with password, Create User with imported hashed password, or Create User with Password & Recovery Question. Be advised that the calls should be done with the ?activate=true parameter or a subsequent Activate user for the user to be in an Active state.

Postman - Activate user

  1. Press Send to send the API. If successful, a 200 SUCCESS response will be received along with a schema of the user's proprieties.

Body

  1. Capture the field marked as id from the previous call.

  2. Use the captured id parameter as the {{userId}} variable in the Expire Password call that will be done to expire the password for the user.

Postman - Expire password

  1. The user will now be in a Password Expired state.


Related References

 
Loading
Create Users via API Calls with Expired Passwords