<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

Change an Okta User Attribute or Password via API

Lifecycle Management
Okta Classic Engine
Okta Identity Engine

Overview

Administrators can change an Okta user attribute or password by executing an Okta REST API call. Use Postman to configure the API request body with the desired attribute values or new password credentials to update the user profile.

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Okta REST API
  • Universal Directory
  • Users

Solution

What are the steps to change an Okta user attribute or password via API?

 

Change an Okta user attribute or password by configuring the Postman environment, formatting the API request URL and headers, and modifying the request body with the new values.

  1. Set up the Postman environment and import the Okta API collections by following the instructions in Test the Okta REST APIs using Postman.
  2. Verify the attributes are editable in Okta. If the user has a profile master other than Okta, the source application must edit the profile.
  3. Retrieve the variable name to modify by executing an API call or by navigating to Directory > Profile Editor > Okta Profile (default) in the Okta Admin Console.
    Profile Editor
  4. Format the URL and headers for the Update User API call using the PUT method instead of the POST method.
    PUT API Call
    NOTE: If the required attributes are not defined and the POST method is used, Okta returns a 400 Bad Request error.
    API
    Format the URL and headers as shown in the following example.
    URL and Headers format
  5. Modify the request body for the specific use case to change a single attribute or multiple attributes. The password does not display in the response.
    change attribute via API
    change attributes via API
{
  "profile": {
    "department" : "HR",
    "firstName": "John",
    "lastName" : "Smith"
  },
  "credentials": {
        "password": "Supersecretp@ssword123"
  }
}
  1. Select Send to execute the API call. A successful update returns a 200 OK response, modifying the attributes as shown in the before and after examples.
    Before attribute modification
    After attribute modification

Related References

Loading
Change an Okta User Attribute or Password via API | Okta Support