Schema:

ORGANIZATION_USAGE

For guidance on query performance when using organization-wide usage views, see Performance (Organization Usage).

CREDENTIALS view

Important

This view is only available in the organization account. For more information, see Premium views in the organization account.

Organization Usage performance

When you query a specific view in the SNOWFLAKE.ORGANIZATION_USAGE schema, follow the organization-wide guidance in Performance (Organization Usage): bound every scan on history views, list columns explicitly, and use the time filter column table plus worked SQL and anti-patterns there.

This Organization Usage view provides the credentials used for authentication across each account in your organization. Each row corresponds to a different credential.

This view includes rows for the following types of credentials:

This view doesn’t include credentials that have been deleted.

Columns

Organization-level columns

Column NameData TypeDescription
ORGANIZATION_NAMEVARCHARName of the organization.
ACCOUNT_LOCATORVARCHARSystem-generated identifier for the account.
ACCOUNT_NAMEVARCHARUser-defined identifier for the account.

Additional columns

ColumnData typeDescription
CREDENTIAL_IDNUMBERInternal/system-generated identifier for the credential.
NAMEVARCHARName of the credential.
USER_NAMEVARCHARName of the user associated with the credential.
TYPEVARCHAR

Type of the credential. These types include:

DOMAINVARCHAR

Domain of the credential. The domains include:

A given domain can have one or more possible types (specified in the TYPE column).

COMMENTVARCHARComment about the credential.
STATUSVARCHAR

Status of the credential. The status depends on the value in the TYPE column:

  • ACTIVE: The programmatic access token can be used to authenticate and has not expired yet.
  • EXPIRED: The programmatic access token cannot be used to authenticate because the expiration date has passed.
  • DISABLED: The programmatic access token is disabled because user login access is disabled or the user is locked out of logging in.
  • For TYPE = 'KEYPAIR' (key pairs), the status can be one of the following:
  • ACTIVE: The key pair can be used for authentication.
  • EXPIRED: The key pair has passed its expiration time and cannot be used for authentication.
  • DISABLED: The key pair has been explicitly disabled and cannot be used for authentication.

If a key pair is both disabled and past its expiration time, the status is reported as DISABLED.

  • For other types of credentials, the status can be one of the following:
    • PENDING: The user started the enrollment process for an MFA method but has not completed the process. For example, the user started registering an authenticator but never finished the setup process for the authenticator. As a result, the MFA method is not considered to be valid yet.
    • ENROLLED: The user has completed the enrollment process for the MFA method, and the MFA method can be used for second-factor authentication.
ADDITIONAL_DETAILSOBJECT

Additional details about the credential. The additional details depend on the type of the credential (the value in the TYPE column):

  • For TYPE = 'PAT' (programmatic access tokens), the column contains an OBJECT value with the following key-value pairs:
    • For the MINS_TO_BYPASS_NETWORK_POLICY_REQUIREMENT key, the value is an integer representing the number of minutes during which the requirement of having a network policy is bypassed. You can specify this value when generating the token.
    • For the ROLE_RESTRICTION key, the value is an array of the roles that are used for privilege evaluation and object creation during the session authenticated with this token. You can specify these roles when generating the token.
    • For the ROTATED_TO key, the value is the name of the newer token that this token was replaced by during rotation.

These key-value pairs are present only if the corresponding properties are set in the token. For example:

{
  "MINS_TO_BYPASS_NETWORK_POLICY_REQUIREMENT": 60,
  "ROLE_RESTRICTION": ["MY_ROLE"],
  "ROTATED_TO": "MY_PAT_NAME"
}

If none of these are specified for the token, the column contains an empty object ({}).

  • For TYPE = 'PASSKEY' (passkey), the column contains an OBJECT value with the key-value pair aaguid. For example:
{
  "aaguid": "a12345678-..."
}
  • For TYPE = 'TOTP' (time-based one-time passcode), the column contains NULL.

  • For TYPE = 'AWS' (workload identity federation), the column contains an OBJECT value with the following key-value pairs:

    • For the aws_partition key, the value is the AWS partition for the federated identity.
    • For the aws_account key, the value is the AWS account identifier for the federated identity.
    • For the type key, the value is the type of the federated identity. This can be IAM_USER or IAM_ROLE.
    • For the iam_role key, the value is the name of the federated IAM role or user.
  • For TYPE = 'AZURE' (workload identity federation), the column contains an OBJECT value with the following key-value pairs:

    • For the issuer key, the value is the Entra ID tenant’s Authority URL.
    • For the subject key, the value is the Object ID (Principal ID) assigned to the Azure workload that is using a managed identity.
  • For TYPE = 'GCP' (workload identity federation), the column contains an OBJECT value with the following key-value pairs:

    • For the subject key, the value is the uniqueId property of the Google Cloud service account associated with the federated workload.
  • For TYPE = 'OIDC' (workload identity federation), the column contains an OBJECT value with the following key-value pairs:

    • For the issuer key, the value is the issuer URL of the OpenID Connect (OIDC) provider.
    • For the subject key, the value is the identifier of the federated workload.
    • For the audience_list key, the value is the custom audiences that are allowed in an OIDC ID token. An empty value means the default audience snowflakecomputing.com is required.
  • For TYPE = 'KEYPAIR' (key pair), the column contains an OBJECT value with the following key-value pairs:

    • For the KEY_TYPE key, the value is the algorithm of the key pair (for example, RSA).
    • For the PUBLIC_KEY_FP key, the value is the SHA-256 fingerprint of the public key.
CREATED_BYVARCHARName of the user who created the credential.
LAST_ALTERED_BYVARCHARName of the user who last modified the credential.
CREATED_ONTIMESTAMP_LTZDate and time when the credential was created.
LAST_USED_ONTIMESTAMP_LTZDate and time when the credential was last used for authentication.
LAST_ALTEREDTIMESTAMP_LTZDate and time when the credential was last modified.
EXPIRATION_DATETIMESTAMP_LTZDate and time when the credential expires.

Usage notes

  • Latency for the view may be up to 24 hours.
  • If a programmatic access token is generated soon after a user is created, the information about that user in this view might be incomplete. It might take some time for the user information to be included in the view.