The Roles API provides operations to manage administrative Role assignments for a User.
Role listing APIs provide a union of both standard and Custom Roles assigned to a User or Group.
okta.roles.read
Lists all 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 new role
description required | string Description of the role |
label required | string Unique label for the role |
permissions required | Array of strings (RolePermissionType) Array of permissions that the role will grant. See Permission Types. |
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 a role by roleIdOrLabel
OK
Bad Request
Forbidden
Not Found
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.manage
Deletes a 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": [ ]
}
okta.roles.read
Lists all permissions of the role by roleIdOrLabel
OK
Forbidden
Not Found
Too Many Requests
{- "permissions": [
- {
- "label": "okta.users.create",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
}
}, - {
- "label": "okta.users.read",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
}
}, - {
- "label": "okta.groups.read",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
}
}, - {
- "label": "okta.users.userprofile.manage",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
}
}
]
}
okta.roles.read
Retrieves a permission by permissionType
OK
Forbidden
Not Found
Too Many Requests
{- "label": "okta.users.manage",
- "created": "2021-02-06T16:20:57.000Z",
- "lastUpdated": "2021-02-06T16:20:57.000Z",
- "_links": {
}
}
okta.roles.manage
Creates a permission specified by permissionType
to the role
No Content
Bad Request
Forbidden
Not Found
Too Many Requests
{- "errorCode": "E0000001",
- "errorSummary": "Api validation failed: {0}",
- "errorLink": "E0000001",
- "errorId": "sampleiCF-8D5rLW6myqiPItW",
- "errorCauses": [ ]
}
okta.roles.manage
Deletes a permission from a role by permissionType
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": [ ]
}