steampipe plugin install workos

Table: workos_directory - Query WorkOS Directories using SQL

WorkOS Directories is a feature within WorkOS that enables you to manage and sync your organization's directory data. It provides a centralized way to handle directory services, including users, groups, and more. WorkOS Directories assists you in maintaining an updated and organized view of your directory structure across various platforms.

Table Usage Guide

The workos_directory table provides insights into directories within WorkOS. As an IT administrator, explore directory-specific details through this table, including directory ID, name, type, and state. Utilize it to uncover information about directories, such as those that are active or inactive, the type of directory (e.g., Google Workspace, Azure AD), and the verification of directory names.

Examples

Basic info

Explore which directories are active within your organization, when they were created, and their associated domain details. This can be beneficial for understanding the structure and timeline of your organizational directories.

select
id,
name,
state,
organization_id,
created_at,
domain
from
workos_directory;
select
id,
name,
state,
organization_id,
created_at,
domain
from
workos_directory;

List directories of a particular organization

Determine the areas in which specific organizational directories are located and when they were created. This is particularly useful for tracking and managing directories within a certain organization.

select
d.id as directory_id,
d.name as directory_name,
d.state,
d.organization_id,
d.created_at,
d.domain
from
workos_directory as d,
workos_organization as o
where
d.organization_id = o.id
and o.name = 'test';
select
d.id as directory_id,
d.name as directory_name,
d.state,
d.organization_id,
d.created_at,
d.domain
from
workos_directory as d,
workos_organization as o
where
d.organization_id = o.id
and o.name = 'test';

List unlinked directories

Discover the segments that contain unlinked directories to maintain data integrity and ensure all directories are properly connected. This is beneficial in identifying potential issues that could affect data accessibility and organization.

select
id,
name,
state,
organization_id,
created_at,
domain
from
workos_directory
where
state = 'unlinked';
select
id,
name,
state,
organization_id,
created_at,
domain
from
workos_directory
where
state = 'unlinked';

List gsuite directories

Explore the Gsuite directories in your organization to understand their current state and creation date. This can be useful for auditing purposes or to manage the directories more effectively.

select
id,
name,
state,
organization_id,
created_at,
domain
from
workos_directory
where
type = 'gsuite directory';
select
id,
name,
state,
organization_id,
created_at,
domain
from
workos_directory
where
type = 'gsuite directory';

List directories created in the last 30 days

Explore recent organizational changes by identifying directories that were established within the last month. This allows for a timely review and management of new additions to the system.

select
id,
name,
state,
organization_id,
created_at,
domain
from
workos_directory
where
created_at >= now() - interval '30' day;
select
id,
name,
state,
organization_id,
created_at,
domain
from
workos_directory
where
created_at >= datetime('now', '-30 day');

Schema for workos_directory

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
created_attimestamp with time zoneThe timestamp of when the directory was created.
domaintext=Directory domain.
external_keytextExternally used identifier for the directory.
idtext=Directory unique identifier.
idp_idtextThe user's directory provider's identifier.
nametext=Directory name.
organization_idtext=Identifier for the directory's organization.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statetextLinked status for the directory.
titletextTitle of the resource.
typetextType of the directory.
updated_attimestamp with time zoneThe timestamp of when the directory was updated.

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)" -- workos

You can pass the configuration to the command with the --config argument:

steampipe_export_workos --config '<your_config>' workos_directory