Schema:

ACCOUNT_USAGE

USERS view

This Account Usage view can be used to query a list of all users in the account.

Columns

Column NameData TypeDescription
USER_IDNUMBERInternal/system-generated identifier for the user.
NAMEVARCHARA unique identifier for the user.
CREATED_ONTIMESTAMP_LTZDate and time (in the UTC time zone) when the user’s account was created.
DELETED_ONTIMESTAMP_LTZDate and time (in the UTC time zone) when the user’s account was deleted.
LOGIN_NAMEVARCHARName that the user enters to log into the system.
DISPLAY_NAMEVARCHARName displayed for the user in the Snowflake web interface.
FIRST_NAMEVARCHARFirst name of the user.
LAST_NAMEVARCHARLast name of the user.
EMAILVARCHAREmail address for the user.
MUST_CHANGE_PASSWORDBOOLEANSpecifies whether the user is forced to change their password on their next login.
HAS_PASSWORDBOOLEANSpecifies whether a password was created for the user.
COMMENTVARCHARComment for the user.
DISABLEDVARIANTSpecified whether the user account is disabled preventing the user from logging in to the Snowflake and running queries.
SNOWFLAKE_LOCKVARIANTSpecifies whether a temporary lock has been placed on the user’s account.
DEFAULT_WAREHOUSEVARCHARThe virtual warehouse that is active by default for the user’s session upon login.
DEFAULT_NAMESPACEVARCHARThe namespace (database only or database and schema) that is active by default for the user’s session upon login.
DEFAULT_ROLEVARCHARThe role that is active by default for the user’s session upon login.
EXT_AUTHN_DUOBOOLEANSpecifies whether Duo Security is enabled for the user, which requires the user to use MFA (multi-factor authorization) for login.
EXT_AUTHN_UIDVARCHARThe authorization ID used for Duo Security.
HAS_MFABOOLEANSpecifies whether the user is enrolled for multi-factor authentication.
BYPASS_MFA_UNTILTIMESTAMP_LTZThe number of minutes to temporarily bypass MFA for the user.
LAST_SUCCESS_LOGINTIMESTAMP_LTZDate and time (in the UTC time zone) when the user last logged in to the Snowflake.
EXPIRES_ATTIMESTAMP_LTZThe date and time when the user’s status is set to EXPIRED and the user can no longer log in. This is useful for defining temporary users (e.g. users who should only have access to Snowflake for a limited time period).
LOCKED_UNTIL_TIMETIMESTAMP_LTZSpecifies the number of minutes until the temporary lock on the user login is cleared.
HAS_RSA_PUBLIC_KEYBOOLEANSpecifies whether RSA public key used for key pair authentication has been set up for the user.
PASSWORD_LAST_SET_TIMETIMESTAMP_LTZThe timestamp on which the last non-null password was set for the user. Default to null if no password has been set yet or if Snowflake is unable to determine the timestamp for the user before the inclusion of this column.
OWNERVARCHARSpecifies the role with the OWNERSHIP privilege on the object.
DEFAULT_SECONDARY_ROLEVARCHARSpecifies the default secondary role for the user (that is, ALL) or NULL if not set.
HAS_PATBOOLEANIf TRUE, a programmatic access token (PAT) has been generated for the user.
HAS_WORKLOAD_IDENTITYBOOLEANIf TRUE, the user is configured to use workload identity federation to authenticate with Snowflake.
TYPEVARCHARSpecifies the type of user.
DATABASE_NAMEVARCHARWhen the user TYPE is SNOWFLAKE_SERVICE, it specifies the service’s database name; otherwise, it’s NULL.
DATABASE_IDNUMBERWhen the user TYPE is SNOWFLAKE_SERVICE, it specifies the internal, Snowflake-generated identifier for the service’s database; otherwise, it’s NULL.
SCHEMA_NAMEVARCHARWhen the user TYPE is SNOWFLAKE_SERVICE, it specifies the service’s schema name; otherwise, it’s NULL.
SCHEMA_IDNUMBERWhen the user TYPE is SNOWFLAKE_SERVICE, it specifies the internal, Snowflake-generated identifier for the service’s schema; otherwise, it’s NULL.
IS_FROM_ORGANIZATION_USERBOOLEANIf TRUE, the user was imported from an organization user.

Usage notes

  • Latency for the view may be up to 120 minutes (2 hours).
  • The LAST_SUCCESS_LOGIN column may have a value that differs from the last_success_login column in the SHOW USERS command output because of different methodologies used to record near-real-time and historical logins. The column might have a NULL value if the login history data for the user is outside the one-year retention period of historical data.
  • Columns that are not applicable to service users (that is, users with TYPE=SERVICE) contain NULL values. For example, HAS_PASSWORD contains NULL values for service users.
  • The deletedOn column might not be accurate for Snowpark Container Services service user. For services created before release 8.42.0, the deletedOn column of the service user shows as empty even if the associated service is dropped; For services created after release 8.42.0, the deletedOn column of the service user shows as the deletion time of the associating service.

Internal Snowflake User for Snowsight

The first time Snowsight is accessed in an account, Snowflake creates an internal WORKSHEETS_APP_USER user to support the web interface. This user is used to cache query results in an internal stage in an account. For more information, see Getting started with Snowsight.