<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
Changing an Okta User's Attributes or Password via API
Lifecycle Management
Okta Classic Engine
Okta Identity Engine
Overview

This article describes how to change an Okta User's attribute(s) or password via API.

Applies To
  • Okta API
  • Users
  • Universal Directory
Solution

Admins may leverage Postman, copy the body and URL, and get to POST-ing. To start this, please follow the steps for setting up the environment and getting the Okta API collections

PUT API Call  

  • If Admins do not define the required attributes and use POST, Admins will receive a 400 Bad Request error:

API 

If errors are thrown, please: 

  1. Check if attributes are editable in Okta. If the user has another profile master other than Okta, the application must edit their profiles.
  2. Retrieve the variable name that Admins want to modify. This can be done through API or just by checking the Okta Profile in the Profile editor (Admin Dashboard > Directory > Profile Editor > Okta Profile (default)).

Profile Editor

  1. Format the URL and headers just like in the image below:

URL and Headers format

  1. Modify the body for the Admin's use case. The password will not be displayed in the response.
    • Here is how it would look for a single attribute change or multiple:

change attribute via API

change attributes via API

Body: 

{
  "profile": {
    "department" : "HR",
    "firstName": "John",
    "lastName" : "Smith"
  },
  "credentials": {
        "password": "Supersecretp@ssword123"
  }
}

 

  1. Click Send. If a 200 OK response is received, congratulations!
  • Here is a before and after example of the attribute(s) being modified. 

Before attribute modification

 

After attribute modification
 
 
 
Loading
Changing an Okta User's Attributes or Password via API