Skip to main content

user_groups

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

Overview

Nameuser_groups
TypeResource
Idokta.users.user_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique ID for the group (example: 0gabcd1234)
_embeddedobjectEmbedded resources related to the group
_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.
createdstring (date-time)Timestamp when the group was created
lastMembershipUpdatedstring (date-time)Timestamp when the groups memberships were last updated
lastUpdatedstring (date-time)Timestamp when the group's profile was last updated
objectClassarrayDetermines the group's profile
profileSpecifies required and optional properties for a group. The objectClass of a group determines which additional properties are available. You can extend group profiles with custom properties, but you must first add the properties to the group profile schema before you can reference them. Use the Profile Editor in the Admin Console or the Schemas APIto manage schema extensions. Custom properties can contain HTML tags. It is the client's responsibility to escape or encode this data before displaying it. Use best-practices to prevent cross-site scripting.
typestringDetermines how a group's profile and memberships are managed

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_user_groupsselectsubdomainLists all groups of which the user is a member.
> Note: To list all groups in your org, use the List all groups endpoints in the Groups API.

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)

SELECT examples

Lists all groups of which the user is a member.
> Note: To list all groups in your org, use the List all groups endpoints in the Groups API.

SELECT
id,
_embedded,
_links,
created,
lastMembershipUpdated,
lastUpdated,
objectClass,
profile,
type
FROM okta.users.user_groups
WHERE subdomain = '{{ subdomain }}' -- required;