- Schema:
CREDENTIALS view¶
This Account Usage view includes a row for each credential used as a first or second factor for authentication. This view includes rows for the following types of credentials:
Note
This view does not include information about Duo authenticators (Duo push and passcodes).
To determine if a user has configured Duo as a second factor for authentication, you can run the SHOW MFA METHODS command.
This view does not include credentials that have been deleted.
Columns¶
Column |
Data type |
Description |
---|---|---|
CREDENTIAL_ID |
NUMBER |
Internal/system-generated identifier for the credential. |
NAME |
VARCHAR |
Name of the credential. |
USER_NAME |
VARCHAR |
Name of the user associated with the credential. |
TYPE |
VARCHAR |
Type of the credential. These types include:
|
DOMAIN |
VARCHAR |
Domain of the credential. The domains include:
A given domain can have one or more possible types (specified in the TYPE column). |
COMMENT |
VARCHAR |
Comment about the credential. |
STATUS |
VARCHAR |
Status of the credential. The status depends on the value in the TYPE column:
|
ADDITIONAL_DETAILS |
OBJECT |
Additional details about the credential. The additional details depend on the type of the credential (the value in the TYPE column):
|
CREATED_BY |
VARCHAR |
Name of the user who created the credential. |
LAST_ALTERED_BY |
VARCHAR |
Name of the user who last modified the credential. |
CREATED_ON |
TIMESTAMP_LTZ |
Date and time when the credential was created. |
LAST_USED_ON |
TIMESTAMP_LTZ |
Date and time when the credential was last used for authentication. |
LAST_ALTERED |
TIMESTAMP_LTZ |
Date and time when the credential was last modified. |
EXPIRATION_DATE |
TIMESTAMP_LTZ |
Date and time when the credential expires. |
Usage notes¶
Latency for the view might be up to two 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.
Examples¶
The following example returns rows for programmatic access tokens:
SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.CREDENTIALS WHERE type = 'PAT';
+---------------+---------------+--------------+------+---------------------------+-------------------+--------+--------------------+--------------+-----------------+-------------------------+-------------------------+-------------------------+
| CREDENTIAL_ID | NAME | USER_NAME | TYPE | DOMAIN | COMMENT | STATUS | ADDITIONAL_DETAILS | CREATED_BY | LAST_ALTERED_BY | CREATED_ON | LAST_USED_ON | LAST_ALTERED |
|---------------+---------------+--------------+------+---------------------------+-------------------+--------+--------------------+--------------+-----------------+-------------------------+-------------------------+-------------------------|
| 19464837 | EXAMPLE_TOKEN | EXAMPLE_USER | PAT | PROGRAMMATIC_ACCESS_TOKEN | My token for APIs | ACTIVE | {} | EXAMPLE_USER | EXAMPLE_USER | 2025-04-14 22:05:19.661 | 2025-04-14 22:05:19.661 | 2025-04-14 22:05:19.661 |
+---------------+---------------+--------------+------+---------------------------+-------------------+--------+--------------------+--------------+-----------------+-------------------------+-------------------------+-------------------------+