Skip to content

Update an Active Directory account rule

Request

Early Access
OPA roles:
  • resource_admin

Updates an Active Directory account rule

Security
bearerAuth
Path
team_namestringrequired

The name of your team

ad_connection_idstring, (regex)(schemas-UUID)^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-...read-onlyrequired

The UUID of an Active Directory connection

Example:a747a818-a4c4-4446-8a87-704216495a08
ad_account_rule_idstring, (regex)(schemas-UUID)^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-...read-onlyrequired

The UUID of an Active Directory account rule

Example:a747a818-a4c4-4446-8a87-704216495a08
Bodyapplication/json
enable_import_okta_usersboolean

If false, the Active Directory accounts in the organizational unit (OU) targeted by this rule are no longer active Okta users. If true and Okta Active Directory integration is configured, then the accounts can become active Okta users. See Import Active Directory users on demand.

Default:false
enable_initial_password_rotationboolean

If true, the initial password rotation is enabled for discovered Active Directory accounts

Default:true
enhanced_filtersArray of items

One list per OU. The index aligns with 'organizational_units'. Each inner list contains field-based filter expressions. If it's omitted or empty, no per-OU conditions are applied.

namestring

The name of the Active Directory account rule

organizational_unitsArray of strings

The list of organizational units to discover individual accounts from

projectobject(NamedObject)

A reference to an object that has its ID, name and type

resource_groupobject(NamedObject)

A reference to an object that has its ID, name and type

rule_typestring

The type of the Active Directory account rule

Enum:"SHARED""INDIVIDUAL"
curl -i -X PUT \
  'https://{org_name}.pam.okta.com/v1/teams/{team_name}/resource_assignment/active_directory/a747a818-a4c4-4446-8a87-704216495a08/rules/a747a818-a4c4-4446-8a87-704216495a08' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "enable_import_okta_users": false,
    "enable_initial_password_rotation": true,
    "enhanced_filters": [
      [
        {
          "field": "account_name",
          "operator": "CONTAINS",
          "value": "string"
        }
      ]
    ],
    "name": "string",
    "organizational_units": [
      "string"
    ],
    "project": {
      "id": "string",
      "missing": false
    },
    "resource_group": {
      "id": "string",
      "missing": false
    },
    "rule_type": "SHARED"
  }'

Responses

No Content