Skip to main content

group_memberships

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

Overview​

Namegroup_memberships
TypeResource
Idokta.identity_sources.group_memberships

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_identity_source_group_membershipsselectidentitySourceId, groupOrExternalId, subdomainafter, limitRetrieves the group memberships for the given identity source group in the given identity source instance
create_identity_source_groups_membershipsinsertidentitySourceId, groupOrExternalId, subdomainCreates the group memberships for the given identity source group
delete_identity_source_group_membershipsdeleteidentitySourceId, groupOrExternalId, memberExternalId, subdomainDeletes group memberships for the specified identity source group using member external IDs

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
groupOrExternalIdstringThe Okta group ID or external ID of the identity source group (example: 00gsl4xM9ys8TdnbZ0g4 or GROUPEXT123456784C2IF)
identitySourceIdstringThe ID of the identity source for which the session is created (example: 0oa3l6l6WK6h0R0QW0g4)
memberExternalIdstringThe external ID of the identity source user (example: USEREXT123456784C2IFA)
subdomainstring(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 and Link header.
limitinteger (int32)Specifies the number of group membership results in a page. Okta recommends using a specific value other than the default or maximum. If your request times out, retry your request with a smaller limit and page the results.

SELECT examples​

Retrieves the group memberships for the given identity source group in the given identity source instance

SELECT
*
FROM okta.identity_sources.group_memberships
WHERE identitySourceId = '{{ identitySourceId }}' -- required
AND groupOrExternalId = '{{ groupOrExternalId }}' -- required
AND subdomain = '{{ subdomain }}' -- required
AND after = '{{ after }}'
AND limit = '{{ limit }}'
;

INSERT examples​

Creates the group memberships for the given identity source group

INSERT INTO okta.identity_sources.group_memberships (
memberExternalId,
identitySourceId,
groupOrExternalId,
subdomain
)
SELECT
'{{ memberExternalId }}',
'{{ identitySourceId }}',
'{{ groupOrExternalId }}',
'{{ subdomain }}'
;

DELETE examples​

Deletes group memberships for the specified identity source group using member external IDs

DELETE FROM okta.identity_sources.group_memberships
WHERE identitySourceId = '{{ identitySourceId }}' --required
AND groupOrExternalId = '{{ groupOrExternalId }}' --required
AND memberExternalId = '{{ memberExternalId }}' --required
AND subdomain = '{{ subdomain }}' --required
;