Table: okta_group - Query Okta Groups using SQL
Okta Groups are a collection of users defined in the Okta service. They provide a way to manage users and their access to applications and resources. Groups are central to the role-based access control (RBAC) model in Okta, and they can be used for assigning roles and permissions.
Table Usage Guide
The okta_group
table provides insights into groups within Okta. As an IT administrator, explore group-specific details through this table, including group profile, type, and associated users. Utilize it to manage access control, identify groups with specific roles, and verify the consistency of group memberships.
Important Notes
- This table supports an optional
filter
column to query results based on Okta supported filters.
Examples
Basic info
Explore the basic information about user groups in Okta to understand their purpose and configuration. This is useful for managing access controls and implementing security policies.
select name, id, type, description, jsonb_pretty(profile) as profilefrom okta_group;
select name, id, type, description, profilefrom okta_group;
List groups without membership changes for more than 30 days
Determine the groups that have not undergone membership alterations in over a month. This could be useful for identifying inactive or stagnant groups and assessing the need for membership reviews or updates.
select name, id, type, age(current_timestamp, last_membership_updated) as last_membership_updatedfrom okta_groupwhere last_membership_updated < current_timestamp - interval '30 days';
select name, id, type, julianday('now') - julianday(last_membership_updated) as last_membership_updatedfrom okta_groupwhere julianday('now') - julianday(last_membership_updated) > 30;
List groups with profile or membership updates after a specific date using a filter
Explore which groups have had updates to their profiles or memberships after a specific date. This is useful for keeping track of recent changes in group data and ensuring up-to-date information.
select name, id, type, last_updated, last_membership_updatedfrom okta_groupwhere filter = 'type eq "OKTA_GROUP" and (lastUpdated gt "2021-05-05T00:00:00.000Z" or lastMembershipUpdated gt "2021-05-05T00:00:00.000Z")';
select name, id, type, last_updated, last_membership_updatedfrom okta_groupwhere filter = 'type eq "OKTA_GROUP"' and ( datetime(lastUpdated) > datetime('2021-05-05T00:00:00') or datetime(lastMembershipUpdated) > datetime('2021-05-05T00:00:00') );
Get group member details for each group
Determine the members associated with each group within your organization. This can help in understanding the group structure and managing user access effectively.
select name, id, jsonb_pretty(group_members) as group_membersfrom okta_group;
select name, id, group_membersfrom okta_group;
Schema for okta_group
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
created | timestamp with time zone | Timestamp when Group was created. | |
description | text | Description of the Group. | |
domain | text | =, !=, ~~, ~~*, !~~, !~~* | The okta domain name. |
filter | text | = | Filter string to [filter](https://developer.okta.com/docs/reference/api/users/#list-users-with-a-filter) users. Input filter query should not be encoded. |
group_members | jsonb | List of all users that are a member of this Group. | |
id | text | = | Unique key for Group. |
last_membership_updated | timestamp with time zone | >, >=, =, <, <= | Timestamp when Group's memberships were last updated. |
last_updated | timestamp with time zone | >, >=, =, <, <= | Timestamp when Group's profile was last updated. |
name | text | Name of the Group. | |
object_class | jsonb | Determines the Group's profile. | |
profile | jsonb | The Group's Profile properties. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | The title of the resource. | |
type | text | = | Determines how a Group's Profile and memberships are managed. Can be one of OKTA_GROUP, APP_GROUP or BUILT_IN. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- okta
You can pass the configuration to the command with the --config
argument:
steampipe_export_okta --config '<your_config>' okta_group