turbot/googleworkspace
steampipe plugin install googleworkspace

Table: googleworkspace_gmail_my_settings - Query Google Workspace Gmail Settings using SQL

Gmail Settings in Google Workspace is a feature that allows users to customize their Gmail experience according to their preferences. It includes options to manage filters, forwarding rules, IMAP and POP settings, and send-as aliases. These settings help users to manage their email communication effectively and efficiently.

Table Usage Guide

The googleworkspace_gmail_my_settings table provides insights into the Gmail Settings in Google Workspace. As a system administrator or a user, explore your email settings through this table, including filters, forwarding rules, IMAP and POP settings, and send-as aliases. Utilize it to uncover information about your Gmail settings, such as those related to email forwarding, the filters applied to incoming emails, and the configuration of IMAP and POP settings.

Important Notes

  • To list delegated accounts, you must authenticate using a service account client that has been delegated domain-wide authority.

Examples

Basic info

Explore the language settings and delegation details associated with your Google Workspace Gmail account. This can be useful for understanding user preferences and managing access rights.

select
user_email,
display_language,
delegates
from
googleworkspace_gmail_my_settings;
select
user_email,
display_language,
delegates
from
googleworkspace_gmail_my_settings;

List users with delegated access to their mailbox

Explore which users have delegated access to their mailbox in Google Workspace. This can be useful for assessing security and access control within your organization.

select
user_email,
display_language,
delegates
from
googleworkspace_gmail_my_settings
where
delegates is not null;
select
user_email,
display_language,
delegates
from
googleworkspace_gmail_my_settings
where
delegates is not null;

List users with IMAP access enabled

Explore which users have IMAP access enabled in their Gmail settings. This could be useful for administrators looking to manage or restrict certain types of email access.

select
user_email,
display_language,
(imap ->> 'enabled') :: boolean as imap_enabled
from
googleworkspace_gmail_my_settings
where
(imap ->> 'enabled') :: boolean;
select
user_email,
display_language,
json_extract(imap, '$.enabled') as imap_enabled
from
googleworkspace_gmail_my_settings
where
json_extract(imap, '$.enabled');

List users with POP access enabled

Identify instances where users have enabled POP access in their Gmail settings. This is useful in understanding the email access preferences within your organization.

select
user_email,
display_language,
pop ->> 'accessWindow' as pop_access_window
from
googleworkspace_gmail_my_settings
where
pop ->> 'accessWindow' = 'enabled';
select
user_email,
display_language,
json_extract(pop, '$.accessWindow') as pop_access_window
from
googleworkspace_gmail_my_settings
where
json_extract(pop, '$.accessWindow') = 'enabled';

List users with automatic forwarding enabled

Determine the areas in which users have enabled automatic forwarding in their email settings. This is useful for understanding the flow of information within your organization and ensuring compliance with communication policies.

select
user_email,
display_language,
(auto_forwarding ->> 'enabled') :: boolean as auto_forwarding_enabled
from
googleworkspace_gmail_my_settings
where
(auto_forwarding ->> 'enabled') :: boolean;
select
user_email,
display_language,
json_extract(auto_forwarding, '$.enabled') as auto_forwarding_enabled
from
googleworkspace_gmail_my_settings
where
json_extract(auto_forwarding, '$.enabled');

Schema for googleworkspace_gmail_my_settings

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
auto_forwardingjsonbDescribes the auto-forwarding setting for the specified account.
delegatesjsonbA list of delegates for the specified account.
display_languagetextSpecifies the language settings for the specified account.
imapjsonbDescribes the IMAP setting for the specified account.
popjsonbDescribes the POP settings for the specified account.
user_emailtextThe user's email address.
vacationjsonbDescribes the vacation responder settings for the specified account.

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

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

steampipe_export_googleworkspace --config '<your_config>' googleworkspace_gmail_my_settings