To perform a bulk update of Okta recovery questions for multiple users simultaneously, export a user list and execute a collection run using Postman and the Okta Application Programming Interface (API).
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Application Programming Interface (API)
- Postman
- User Administration
- User Accounts Report
How is a recovery question set for users in bulk using Postman?
To update the recovery questions for multiple users, export a CSV file of the target users from the Admin Console, format the file, and execute a PUT request collection in Postman using the Okta API.
NOTE: Okta recommends using scoped OAuth 2.0 and OpenID Connect (OIDC) access tokens to authenticate with Okta management APIs. OAuth 2.0 and OIDC access tokens provide fine-grain control over the bearer's actions on specific endpoints. Whenever possible, Okta recommends using OAuth 2.0 and OIDC access tokens as detailed in How to Integrate Postman with Okta and Implement OAuth for Okta.
- Generate a CSV file containing the
userIdvalues that require updates.- In the Okta Admin Console, navigate to Reports > Reports > select User Accounts.
- Click Edit Filters to filter the report.
- Select the desired filters to apply, or leave the filters blank to show all users.
- Click Apply.
- Click CSV Export.
- Edit the exported CSV file to retain only the user ID column, deleting any extra columns, and change the header of the
user.Idcolumn touserId.
- Create the following call inside Postman:
PUT {{url}}/api/v1/users/{{userId}}
- Headers:
- Key:
Content-TypeValue:application/json - Key:
AcceptValue:application/json
- Key:
- Body:
NOTE: The body payload determines the security question and answer for all the users.{ "credentials": { "recovery_question": { "question": "What is your favourite pet?", "answer": "cat" } } }
- Create a new collection in Postman and add the call to it.
- Navigate to the collection and click Run Collection.
- Open the Postman Runner and select the collection, environment, and iterations. Add a delay between calls to avoid hitting the API Rate Limit.
- Run the call in the Postman Runner.
