Skip to content

Replace a custom role permission

Request

OAuth 2.0 scope:
  • okta.roles.manage

Replaces a permission (specified by permissionType) for a custom role

Path
roleIdOrLabelstringrequired

id or label of the role

Example:cr0Yq6IJxGIr0ouum0g3
permissionTypestringrequired

An Okta permission

Example:okta.users.manage
Bodyapplication/json
conditionsobject or null(PermissionConditions)

Conditions for further restricting a permission. See Permission conditions.

curl -i -X PUT \
  https://subdomain.okta.com/api/v1/iam/roles/cr0Yq6IJxGIr0ouum0g3/permissions/okta.users.manage \
  -H 'Content-Type: application/json' \
  -d '{
    "conditions": {
      "include": {
        "okta:ResourceAttribute/User/Profile": [
          "city",
          "state"
        ]
      }
    }
  }'

Responses

OK

Bodyapplication/json
conditionsobject or null(PermissionConditions)

Conditions for further restricting a permission. See Permission conditions.

createdstring, (date-time)read-only

Timestamp when the permission was assigned

labelstringread-only

The assigned Okta permission

Example:"okta.users.read"
lastUpdatedstring, (date-time)read-only

Timestamp when the permission was last updated

Response
{ "label": "okta.users.read", "conditions": { "include": { … } }, "created": "2021-02-06T16:20:57.000Z", "lastUpdated": "2021-02-06T16:20:57.000Z", "_links": { "role": { … }, "self": { … } } }