Skip to main content

group_assignments

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

Overview

Namegroup_assignments
TypeResource
Idokta.apps.group_assignments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringID of the group (example: 00g4hb1HChfUriNgW0g4)
_embeddedobjectEmbedded resource related to the Application Group using the JSON Hypertext Application Language specification. If the expand=group query parameter is specified, then the group object is embedded. If the expand=metadata query parameter is specified, then the group assignment metadata is embedded.
_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.
lastUpdatedstring (date-time)Timestamp when the object was last updated (example: 2014-06-24T15:28:14.000Z)
priorityintegerPriority assigned to the group. If an app has more than one group assigned to the same user, then the group with the higher priority has its profile applied to the application user. If a priority value isn't specified, then the next highest priority is assigned by default. See Assign attribute group priority and the sample priority use case.
profileobjectSpecifies the profile properties applied to application users that are assigned to the app through group membership. Some reference properties are imported from the target app and can't be configured. See profile.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_application_group_assignmentsselectsubdomainq, after, limit, expandLists all app group assignments
get_application_group_assignmentselectsubdomainexpandRetrieves an app group assignment
update_group_assignment_to_applicationupdatesubdomainUpdates a group assignment to an app
assign_group_to_applicationreplacesubdomainAssigns a Group to an app, which in turn assigns the app to each User that belongs to the group.
The resulting application user scope is GROUP since the assignment was from the group membership.
unassign_application_from_groupdeletesubdomainUnassigns a Group from an app

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)
afterstringSpecifies the pagination cursor for the next page of results. Treat this as an opaque value obtained through the next link relationship. See Pagination.
expandstringAn optional query parameter to return the corresponding assigned group or the group assignment metadata details in the _embedded property.
limitinteger (int32)Specifies the number of objects to return per page. If there are multiple pages of results, the Link header contains a next link that you need to use as an opaque value (follow it, don't parse it). See [Pagination]https://developer.okta.com/docs/api#pagination.
qstringSpecifies a filter for a list of assigned groups returned based on their names. The value of q is matched against the group name. This filter only supports the startsWith operation that matches the q string against the beginning of the group name.

SELECT examples

Lists all app group assignments

SELECT
id,
_embedded,
_links,
lastUpdated,
priority,
profile
FROM okta.apps.group_assignments
WHERE subdomain = '{{ subdomain }}' -- required
AND q = '{{ q }}'
AND after = '{{ after }}'
AND limit = '{{ limit }}'
AND expand = '{{ expand }}';

UPDATE examples

Updates a group assignment to an app

UPDATE okta.apps.group_assignments
SET
-- No updatable properties
WHERE
subdomain = '{{ subdomain }}' --required
RETURNING
id,
_embedded,
_links,
lastUpdated,
priority,
profile;

REPLACE examples

Assigns a Group to an app, which in turn assigns the app to each User that belongs to the group.
The resulting application user scope is GROUP since the assignment was from the group membership.

REPLACE okta.apps.group_assignments
SET
data__priority = {{ priority }},
data__profile = '{{ profile }}'
WHERE
subdomain = '{{ subdomain }}' --required
RETURNING
id,
_embedded,
_links,
lastUpdated,
priority,
profile;

DELETE examples

Unassigns a Group from an app

DELETE FROM okta.apps.group_assignments
WHERE subdomain = '{{ subdomain }}' --required;