<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 User through API that Will Target a Password Policy that is Applied to a Specific Group

Okta Classic Engine
Okta Identity Engine
Administration

Overview

This knowledge article discusses how to create users through the Okta API with a specific password based on a group applied password policy.

Applies To

 

  • Okta Classic Engine
  • Okta Identity Engine (OIE)
  • API
  • Users
  • Groups
  • Password policies

Cause

In order to create users through the Okta API with a specific password based on a group applied password policy, the group information must be included in API call body.

Solution

 

A user can be created with a password that meets the requirements of a password policy assigned to a specific Okta group.

To achieve this, the following API call can be used: {url}/api/v1/users?activate=true with the following body:

{
"profile": {
"firstName": "test",
"lastName": "test",
"email": "test@test.com",
"login": "test@test.com"
},
"credentials": {
"password" : { "value": "example" }
},
"groupIds": [
"<GROUP_ID_FROM_PASSWORD_POLICY>"
]
}

Related References


 

Loading
Create User through API that Will Target a Password Policy that is Applied to a Specific Group | Okta Support