Skip to main content

role_targets

Creates, updates, deletes, gets or lists a role_targets resource.

Overview

Namerole_targets
TypeResource
Idokta.users.role_targets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
assignmentTypestringThe assignment type of how the user receives this target (example: GROUP)
expirationstring (date-time)The expiry time stamp of the associated target. It's only included in the response if the associated target will expire. (example: 2023-08-25T12:00:00.000Z)
ornstringThe Okta Resource Name (ORN) of the app target or group target (example: orn:okta:directory:00o5v1t2W4OSF9r4N0g4:groups:00g5vhi3rEJMOog1S0g4)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_role_targets_by_user_id_and_role_idselectsubdomainassignmentType, after, limitRetrieves all role targets for an APP_ADMIN, USER_ADMIN, HELP_DESK_ADMIN, or GROUP_MEMBERSHIP_ADMIN role assignment to an admin user by user or group assignment type.
If the role isn't scoped to specific group targets or any app targets, an empty array [] is returned.

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)
afterstringThe cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination.
assignmentTypestringSpecifies the assignment type of the user
limitintegerA limit on the number of objects to return

SELECT examples

Retrieves all role targets for an APP_ADMIN, USER_ADMIN, HELP_DESK_ADMIN, or GROUP_MEMBERSHIP_ADMIN role assignment to an admin user by user or group assignment type.
If the role isn't scoped to specific group targets or any app targets, an empty array [] is returned.

SELECT
_links,
assignmentType,
expiration,
orn
FROM okta.users.role_targets
WHERE subdomain = '{{ subdomain }}' -- required
AND assignmentType = '{{ assignmentType }}'
AND after = '{{ after }}'
AND limit = '{{ limit }}';