role_targets
Creates, updates, deletes, gets or lists a role_targets
resource.
Overview
Name | role_targets |
Type | Resource |
Id | okta.users.role_targets |
Fields
The following fields are returned by SELECT
queries:
- get_role_targets_by_user_id_and_role_id
Name | Datatype | Description |
---|---|---|
_links | object | Specifies 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. |
assignmentType | string | The assignment type of how the user receives this target (example: GROUP) |
expiration | string (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) |
orn | string | The 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_role_targets_by_user_id_and_role_id | select | subdomain | assignmentType , after , limit | 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. |
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.
Name | Datatype | Description |
---|---|---|
subdomain | string | The 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) |
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 Link response header. See Pagination. |
assignmentType | string | Specifies the assignment type of the user |
limit | integer | A limit on the number of objects to return |
SELECT
examples
- get_role_targets_by_user_id_and_role_id
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 }}';