groups
Creates, updates, deletes, gets or lists a groups resource.
Overview​
| Name | groups |
| Type | Resource |
| Id | okta.identity_sources.groups |
Fields​
The following fields are returned by SELECT queries:
- get_identity_source_group
| Name | Datatype | Description |
|---|---|---|
id | string | The Okta group ID of the identity source group |
externalId | string | The external ID of the identity source group |
profile | object | The profile information of the group |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_identity_source_group | select | identitySourceId, groupOrExternalId, subdomain | Retrieves a group from an identity source for a given identity source ID and group ID or external ID | |
create_identity_source_groups | insert | identitySourceId, subdomain | Creates a group in an identity source for the given identity source instance | |
update_identity_source_groups | update | identitySourceId, groupOrExternalId, subdomain | Updates a group to an identity source for the given identity source instance and group ID | |
delete_identity_source_group | delete | identitySourceId, groupOrExternalId, subdomain | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
groupOrExternalId | string | The Okta group ID or external ID of the identity source group (example: 00gsl4xM9ys8TdnbZ0g4 or GROUPEXT123456784C2IF) |
identitySourceId | string | The ID of the identity source for which the session is created (example: 0oa3l6l6WK6h0R0QW0g4) |
subdomain | string | (default: my-org) |
SELECT examples​
- get_identity_source_group
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​
- create_identity_source_groups
- Manifest
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
;
# Description fields are for documentation purposes
- name: groups
props:
- name: identitySourceId
value: "{{ identitySourceId }}"
description: Required parameter for the groups resource.
- name: subdomain
value: "{{ subdomain }}"
description: Required parameter for the groups resource.
- name: externalId
value: "{{ externalId }}"
description: |
The external ID of the identity source group to be created
- name: profile
description: |
Contains a set of external group attributes and their values that are mapped to Okta standard properties. See the group [`profile` object](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Group/#tag/Group/operation/getGroup!c=200&path=profile&t=response) and Declaration of a Custom Identity Source Schema in [Using anything as a source](https://help.okta.com/okta_help.htm?type=oie&id=ext-anything-as-a-source).
> **Note:** Profile attributes can only be of the string type.
value:
description: "{{ description }}"
displayName: "{{ displayName }}"
UPDATE examples​
- update_identity_source_groups
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​
- delete_identity_source_group
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
;