Back to Utils

Snowflake · View

login_history

Failed login attempts per user, including IP address, client type and error message. Useful for detecting unauthorised access attempts.

Source: SNOWFLAKE.ACCOUNT_USAGE.LOGIN_HISTORY · Latency: ~2h

ColumnDescription
dateDate
user_nameUser
client_ipIP address of the client
reported_client_typee.g. SNOWFLAKE_UI, JDBC_DRIVER
reported_client_versionClient version string
first_authentication_factore.g. PASSWORD, OAUTH
error_messageSnowflake error message

Source code

create_admin_views.sql
create or replace view login_history
    comment = 'Failed login attempts per user (source: SNOWFLAKE.ACCOUNT_USAGE)'
as
select event_timestamp::date as date
     , user_name
     , client_ip
     , reported_client_type
     , reported_client_version
     , first_authentication_factor
     , error_message
  from snowflake.account_usage.login_history
 where is_success = 'NO'
 order by event_timestamp desc;