Schemas:

ORGANIZATION_USAGE

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

LOGIN_HISTORY 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 can be used to query login attempts by Snowflake users.

Details about the error codes/messages for login attempts that were unsuccessful can be found in the following documentation:

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

Column NameData TypeDescription
READER_ACCOUNT_NAMEVARCHARName of the reader account for the user authentication event. This column is only included in the view in the READER_ACCOUNT_USAGE schema.
EVENT_IDNUMBERInternal/system-generated identifier for the login attempt.
EVENT_TIMESTAMPTIMESTAMP_LTZTime (in the UTC time zone) of the event occurrence.
EVENT_TYPEVARCHAREvent type, such as LOGIN for authentication events.
USER_NAMEVARCHARUser associated with this event.
CLIENT_IPVARCHARIP address where the request originated. This value can be an IPv4 or IPv6 address.
REPORTED_CLIENT_TYPEVARCHARReported type of the client software, such as JDBC_DRIVER, ODBC_DRIVER, and so on. This information is not authenticated.
REPORTED_CLIENT_VERSIONVARCHARReported version of the client software. This information is not authenticated.
FIRST_AUTHENTICATION_FACTORVARCHARMethod used to authenticate the user (the first factor in multi factor authentication, if used).
SECOND_AUTHENTICATION_FACTORVARCHARThe second factor in multi factor authentication. If the user did not use multi-factor authentication, this value is NULL.
IS_SUCCESSVARCHARWhether the user’s request was successful or not.
ERROR_CODENUMBERError code, if the request was not successful.
ERROR_MESSAGEVARCHARError message returned to the user, if the request was not successful.
RELATED_EVENT_IDNUMBERReserved for future use.
CONNECTIONVARCHARName of the connection used by the client, or NULL if the client is not using a connection URL. A connection is a Snowflake object that is part of Client Redirect. It represents a connection URL that you can use to fail over to another account for business continuity and disaster recovery.

NOTE: If a client authenticates through an identity provider (IdP) that is configured with the account URL rather than the connection URL, the IdP directs the client to the account URL after authentication is complete. The CONNECTION column for this login event is NULL. See Authentication and Client Redirect.
CLIENT_PRIVATE_LINK_IDVARCHARIf the user logged in using private connectivity, specifies the identifier of the endpoint from which the request originated.
FIRST_AUTHENTICATION_FACTOR_IDVARCHARID of the credential used to authenticate the user (the first factor in multi-factor authentication, if used).
SECOND_AUTHENTICATION_FACTOR_IDVARCHARID of the credential used for the second factor in multi-factor authentication. If the user did not use multi-factor authentication, this value is NULL.
LOGIN_DETAILSVARCHARDisplays details for each login event, including malicious IP protection category name, risk category, and blocking status.

Usage notes

  • Latency for the view may be up to 24 hours.
  • INTERNAL_SNOWFLAKE_IP/0.0.0.0 appears as the client IP for login events triggered by internal Snowflake operations that support your usage. For example:

    • Because worksheets exist as unique sessions, when a user accesses a worksheet in Snowsight, Snowflake creates a login event that originates from INTERNAL_SNOWFLAKE_IP/0.0.0.0.
    • When a Snowpark Container Services service logs into Snowflake, the client IP is masked to INTERNAL_SNOWFLAKE_IP/0.0.0.0.
  • This view doesn’t record the activity of internal users the system defines to perform various operations, such as maintaining Snowsight worksheets.

  • To see the blocking status of potentially malicious IP addresses, examine the LOGIN_DETAILS column output. For examples, see View network login details.