Skip to main content

groups

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

Overview​

Namegroups
TypeResource
Idokta.identity_sources.groups

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe Okta group ID of the identity source group
externalIdstringThe external ID of the identity source group
profileobjectThe profile information of the group

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_identity_source_groupselectidentitySourceId, groupOrExternalId, subdomainRetrieves a group from an identity source for a given identity source ID and group ID or external ID
create_identity_source_groupsinsertidentitySourceId, subdomainCreates a group in an identity source for the given identity source instance
update_identity_source_groupsupdateidentitySourceId, groupOrExternalId, subdomainUpdates a group to an identity source for the given identity source instance and group ID
delete_identity_source_groupdeleteidentitySourceId, groupOrExternalId, subdomainDeletes a group in an identity source for a given identity source ID and group ID

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)
subdomainstring(default: my-org)

SELECT examples​

Retrieves a group from an identity source for a given identity source ID and group ID or external ID

SELECT
id,
externalId,
profile
FROM okta.identity_sources.groups
WHERE identitySourceId = '{{ identitySourceId }}' -- required
AND groupOrExternalId = '{{ groupOrExternalId }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;

INSERT examples​

Creates a group in an identity source for the given identity source instance

INSERT INTO okta.identity_sources.groups (
externalId,
profile,
identitySourceId,
subdomain
)
SELECT
'{{ externalId }}',
'{{ profile }}',
'{{ identitySourceId }}',
'{{ subdomain }}'
RETURNING
id,
externalId,
profile
;

UPDATE examples​

Updates a group to an identity source for the given identity source instance and group ID

UPDATE okta.identity_sources.groups
SET
externalId = '{{ externalId }}',
profile = '{{ profile }}'
WHERE
identitySourceId = '{{ identitySourceId }}' --required
AND groupOrExternalId = '{{ groupOrExternalId }}' --required
AND subdomain = '{{ subdomain }}' --required
RETURNING
id,
externalId,
profile;

DELETE examples​

Deletes a group in an identity source for a given identity source ID and group ID

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