Okta logs queries
This page contains example Panther queries for Okta log data
Below are a few queries to get started with investigating and learning about your Okta events. These queries are meant to investigate existing log data. If you are interested in detecting new data that flows in, consider enabling the Panther-managed Okta detections here.
The following queries are written for Snowflake SQL syntax, unless noted otherwise.
Top logins by user last 7 days
-- Top logins by user last 7 days
SELECT actor:alternateId as actor, COUNT(*) as total
FROM panther_logs.public.okta_systemlog
WHERE eventtype = 'user.authentication.sso'
and outcome:result = 'SUCCESS'
and p_occurs_since(7d)
GROUP BY actor
ORDER BY total descLogins by hour last 1 day
-- Logins by hour last 1 day
SELECT
time_slice(p_event_time, 1, 'HOUR', 'START') as "start",
time_slice(p_event_time, 1, 'HOUR', 'END') as "end",
count(*) as "logins",
count(distinct(actor:alternateId)) as "users"
FROM panther_logs.public.okta_systemlog
WHERE eventtype = 'user.authentication.sso'
and outcome:result = 'SUCCESS'
and p_occurs_since(1d)
GROUP BY "start", "end"
ORDER BY "start" descTop applications last 7 days
Top failing users last 7 days
Login failures by reason last 7 days
Fake account login attempts last 7 days
Identify Okta Support access to your Okta organization
Snowflake SQL:
Athena SQL:
Identify all users who have been granted Admin privileges in Okta
Snowflake SQL:
Athena SQL:
Last updated
Was this helpful?

