Password

The MyAccount Password API provides operations to enroll, update, and delete passwords.

Note: Super admins can enable the IDP MyAccount API password feature. See Enable self-service features.

API versioning

A valid API version in the Accept header is required to access the API. Current version: 1.0.0

Accept: application/json; okta-version=1.0.0

Retrieve a Password
OAuth 2.0:
  • okta.myAccount.password.read

Retrieves the current user's password status

Note: This request only returns information about the password, not the password itself.

Responses
200

Example response

401

Unauthorized

406

Not Acceptable (missing header)

get/idp/myaccount/password
Request samples
Response samples
application/json;okta-version=1.0.0
{
  • "id": "00T196qTp3LIMZQ0L0g3",
  • "status": "ACTIVE",
  • "created": "2020-01-14T20:05:32.000Z",
  • "lastUpdated": "2020-01-14T20:05:32.000Z",
  • "_links": {}
}

Create a Password
OAuth 2.0:
  • okta.myAccount.password.manage

Creates and enrolls a password for the current user

Request
Request Body schema: application/json

New password

required
object

Defines the password on the profile

password
required
string
Responses
201

Example response

400

Bad Request

401

Unauthorized

403

Conflict

406

Not Acceptable (missing header)

post/idp/myaccount/password
Request samples
application/json
{
  • "profile": {
    • "password": "Abcd1234"
    }
}
Response samples
application/json;okta-version=1.0.0
{
  • "id": "00T196qTp3LIMZQ0L0g3",
  • "status": "ACTIVE",
  • "created": "2020-01-14T20:05:32.000Z",
  • "lastUpdated": "2020-01-14T20:05:32.000Z",
  • "_links": {}
}

Replace a Password
OAuth 2.0:
  • okta.myAccount.password.manage

Replaces the password for the current user by resetting it. A password reset doesn't require the user to know the existing password.

Request
Request Body schema: application/json

New password

required
object

Defines the password on the profile

password
required
string
Responses
201

Example response

400

Bad Request

401

Unauthorized

403

Forbidden

406

Not Acceptable (missing header)

put/idp/myaccount/password
Request samples
application/json
{
  • "profile": {
    • "password": "Abcd1234"
    }
}
Response samples
application/json;okta-version=1.0.0
{
  • "id": "00T196qTp3LIMZQ0L0g3",
  • "status": "ACTIVE",
  • "created": "2020-01-14T20:05:32.000Z",
  • "lastUpdated": "2020-01-14T20:05:32.000Z",
  • "_links": {}
}

Delete a Password
OAuth 2.0:
  • okta.myAccount.password.manage

Deletes the current user's enrolled password

Responses
204

No Content

401

Unauthorized

404

Not Found

406

Not Acceptable (missing header)

delete/idp/myaccount/password
Request samples
Response samples
application/json;okta-version=1.0.0
{
  • "errorCode": "E0000015",
  • "errorSummary": "You do not have permission to access the feature you are requesting",
  • "errorLink": "E0000015",
  • "errorId": "oaeStOuPPxDRUm3PJhf-tL7bQ",
  • "errorCauses": [ ]
}

Update a Password
OAuth 2.0:
  • okta.myAccount.password.manage

Updates a password. The user needs to know the current password to change it.

Request
Request Body schema: application/json

New password

oldPassword
required
string
newPassword
required
string
Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

post/idp/myaccount/password/change-password
Request samples
application/json
{
  • "oldPassword": "Abcd1234",
  • "newPassword": "Abcd12345"
}
Response samples
application/json;okta-version=1.0.0
{
  • "errorCode": "E0000001",
  • "errorSummary": "Api validation failed: Password",
  • "errorLink": "E0000001",
  • "errorId": "oaejUwz8U5FQ_SyggQwz1kC3w",
  • "errorCauses": [
    • {
      }
    ]
}

Retrieve the Password Complexity Requirements
OAuth 2.0:
  • okta.myAccount.password.read

Retrieves the password complexity requirements for the current user

Responses
200

Example response

401

Unauthorized

get/idp/myaccount/password/complexity-requirements
Request samples
Response samples
application/json;okta-version=1.0.0
{
  • "description": "Password requirements: at least 8 characters, a lowercase letter, an uppercase letter, a number, no parts of your username. Your password cannot be any of your last 4 password(s).",
  • "complexity": {
    • "minLength": 8,
    • "minLowerCase": 1,
    • "minUpperCase": 1,
    • "minNumber": 1,
    • "minSymbol": 0,
    • "excludeUsername": true,
    • "excludeAttributes": [ ]
    },
  • "_links": {}
}