Every 5 minutes
Alert your security channel on lockouts and admin grants
Account lockouts, MFA resets and new admin roles appear in chat within minutes.
- Runs
- Every 5 minutes
- Apps
- Okta
- AI
- Not needed
- Access
- admin read (token inherits admin)
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, check the Okta System Log and post to #security in Slack whenever a user is locked out, has MFA reset, or is given an admin role, with the user and who made the change.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A two-person IT team is responsible for the Okta tenant at a 150-person firm. Overnight, one executive's account racks up fifteen failed sign-ins and gets locked out, another user's MFA factors are reset by someone nobody recognizes, and a new super admin is added. All of it sits in the System Log, which nobody reads in real time, and the first sign of trouble is a support ticket the next day.
Every five minutes, the Okta System Log is read for everything since the previous check, filtered down to the event types you care about (user lockouts, MFA factor resets, administrator role assignments), and each match is posted to a Slack channel with the user, the event, the actor, the IP address and the time.
It is meant for small security and IT teams that have no SIEM, or want a lightweight alert beside one.
What you get out of it
Account takeover attempts get seen early
A burst of lockouts against one user is a classic sign of password guessing. Seeing it within minutes lets you reset credentials and block the source before the attacker succeeds.
MFA resets are never silent
Resetting someone's factors is a favorite step in social engineering. An alert naming the admin who did it lets you phone the user and confirm the request was genuine. That one phone call can stop an attacker who has already talked their way past a help desk.
Privilege changes are accountable
If a new super administrator appears, the person responsible must be able to explain it. Posting it publicly in Slack deters casual changes and exposes unauthorized ones. That visibility is a strong deterrent against casual or careless privilege changes.
Protection without buying a SIEM
Teams without a security analytics platform still get alerts for the handful of event types that matter most, at no extra tooling cost. That makes basic detection possible for teams of any size, without a long procurement cycle.
A timeline for incident response
Each alert includes actor, IP and timestamp. That makes it faster to piece together what happened if you have to investigate or write an incident report later. That context turns a vague hunch into a documented sequence of events.
How it works
What happens, step by step
Every 5 minutes, ClickRuntime checks the Okta system log for events since its last check.
It keeps account lockouts, MFA resets and new admin role grants.
Each one is posted to your Slack security channel with who it affected, who did it and when.
Before it runs live
- Connect Okta
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Okta steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, state, notify, report_fetched
ORG = "northwind"
TYPES = {"user.account.lock": "locked out", "user.mfa.factor.reset_all": "had MFA reset",
"user.account.privilege.grant": "was given an admin role"}
def okta(path, **params):
resp = http.get(f"https://{ORG}.okta.com/api/v1/{path}", params=params,
headers={"Authorization": f"SSWS {credentials.secret('OKTA_API_TOKEN')}", "Accept": "application/json"})
resp.raise_for_status()
return resp.json()
@on_trigger
def run(event):
since = state.get("since") or (datetime.now(timezone.utc) - timedelta(minutes=5)).isoformat()
events = okta("logs", since=since, sortOrder="ASCENDING", limit=1000,
filter=" or ".join(f'eventType eq "{t}"' for t in TYPES))
report_fetched(len(events))
if not events:
return {"summary": "Nothing new"}
for e in events:
user = (e.get("target") or [{}])[0].get("alternateId", "unknown user")
notify.slack(f"{user} {TYPES[e['eventType']]} (by {e['actor']['displayName']}, {e['published'][:16]} UTC)",
channel="#security")
state.set("since", events[-1]["published"])
return {"posted": len(events)}FAQ
Common questions
Which Okta events can it alert on?
How delayed are the alerts?
Can failed sign-ins be alerted on only past a threshold?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get a daily list of new and removed accounts
Each morning you see which Okta users were created and which were deactivated the day before.
See how it worksFind accounts with no login in 90 days
Once a month you get the users who haven't signed in for 90 days, ready for review.
See how it worksSee new job listings as they're posted
Jobs that match your keywords show up in a Slack channel, each one only once.
See how it worksKeep exploring
Set up “Alert your security channel on lockouts and admin grants” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.