Skip to main content

assigned_roles

Creates, updates, deletes, gets or lists an assigned_roles resource.

Overview

Nameassigned_roles
TypeResource
Idokta.groups.assigned_roles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_group_assigned_rolesselectsubdomainexpandLists all assigned roles of a group by groupId
get_group_assigned_roleselectsubdomainRetrieves a role assigned to a group (identified by the groupId). The roleAssignmentId is the unique identifier for either a standard role group assignment object or a custom role resource set binding object.
assign_role_to_groupinsertsubdomaindisableNotificationsAssigns a standard role to a group.

You can also assign a custom role to a group, but the preferred method to assign a custom role to a group is to create a binding between the custom role, the resource set, and the group. See Create a role resource set binding.

> Notes:
> * The request payload is different for standard and custom role assignments.
> * For IAM-based standard role assignments, use the request payload for standard roles. However, the response payload for IAM-based role assignments is similar to the custom role's assignment response.
unassign_role_from_groupdeletesubdomainUnassigns a role assignment (identified by roleAssignmentId) from a group (identified by the groupId)

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)
disableNotificationsbooleanGrants the group third-party admin status when set to true
expandstringAn optional parameter used to return targets configured for the standard role assignment in the embedded property. Supported values: targets/groups or targets/catalog/apps

SELECT examples

Lists all assigned roles of a group by groupId

SELECT
*
FROM okta.groups.assigned_roles
WHERE subdomain = '{{ subdomain }}' -- required
AND expand = '{{ expand }}';

INSERT examples

Assigns a standard role to a group.

You can also assign a custom role to a group, but the preferred method to assign a custom role to a group is to create a binding between the custom role, the resource set, and the group. See Create a role resource set binding.

> Notes:
> * The request payload is different for standard and custom role assignments.
> * For IAM-based standard role assignments, use the request payload for standard roles. However, the response payload for IAM-based role assignments is similar to the custom role's assignment response.

INSERT INTO okta.groups.assigned_roles (
subdomain,
disableNotifications
)
SELECT
'{{ subdomain }}',
'{{ disableNotifications }}'
;

DELETE examples

Unassigns a role assignment (identified by roleAssignmentId) from a group (identified by the groupId)

DELETE FROM okta.groups.assigned_roles
WHERE subdomain = '{{ subdomain }}' --required;