The Custom Roles API provides operations to manage custom roles that limit an admin's access to a subset of permissions and resources.
okta.roles.read
Lists all Custom Roles with pagination support
after | string The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the |
OK
Forbidden
Too Many Requests
{- "roles": [
- {
- "id": "cr0Yq6IJxGIr0ouum0g3",
- "label": "UserCreator",
- "description": "Create users",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
- "permissions": {
},
}
}, - {
- "id": "cr0Fw7HKcWIroo88m3r1",
- "label": "GroupMembershipManager",
- "description": "Manage group membership",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
- "permissions": {
},
}
}
], - "_links": {
}
}
okta.roles.manage
Creates a Custom Role
label required | string Unique label for the role |
description required | string Description of the role |
permissions required | Array of strings (RolePermissionType) Array of permissions that the Role grants. See Permissions. |
Success
Bad Request
Forbidden
Too Many Requests
{- "label": "UserCreator",
- "description": "Create users",
- "permissions": [
- "okta.users.create",
- "okta.users.read",
- "okta.groups.read",
- "okta.users.userprofile.manage"
]
}
{- "id": "cr0Yq6IJxGIr0ouum0g3",
- "label": "UserCreator",
- "description": "Create users",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
- "permissions": {
},
}
}
okta.roles.read
Retrieves a role by roleIdOrLabel
OK
Forbidden
Not Found
Too Many Requests
{- "id": "cr0Yq6IJxGIr0ouum0g3",
- "label": "UserCreator",
- "description": "Create users",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
- "permissions": {
},
}
}
okta.roles.manage
Replaces the label and description for a Custom Role by roleIdOrLabel
OK
Bad Request
Forbidden
Not Found
Too Many Requests
{- "label": "UserCreator",
- "description": "Create users"
}
{- "id": "cr0Yq6IJxGIr0ouum0g3",
- "label": "UserCreator",
- "description": "Create users",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
- "permissions": {
},
}
}
okta.roles.manage
Deletes a Custom Role by roleIdOrLabel
No Content
Forbidden
Not Found
Too Many Requests
{- "errorCode": "E0000006",
- "errorSummary": "You do not have permission to perform the requested action",
- "errorLink": "E0000006",
- "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
- "errorCauses": [ ]
}