07/29/2025 | News release | Archived content
Below are three examples of triggering workflows from events in the Okta system log and covering different use cases.
1. Logging a ServiceNow ticket and assigning a user to a high-risk group
In this example, we use an event hook subscribed to user.risk.detect events to fire a workflow. In this scenario, we notify our security team about the event in Slack with useful details and email the manager of the user whose risk level changed.
In cases where a user's risk level is HIGH, we also create a ServiceNow incident, add the user to a high-risk group in Okta, enrich our notification with a link to the ServiceNow incident, and indicate that the user has been added to the group. When the user's risk level lowers, they are removed from the high-risk group.
The workflow will:
Let's walk through the flow. First, we parse out the payload from the user.risk.detect event and assign some values we'll use later in our flow. We then close out the connection to the event hook with a 200 status code.
Next, we'll call some helper flows. One will help us further parse out the debugData.risk event to get the current and previous risk levels. The other will retrieve some profile information about the user whose risk level has elevated and build a link to a system log query about the event.
If the user's risk is now "HIGH," we'll
Finally, we'll take the messages dynamically built up, indicating
We'll combine those with the rest of the risk event details we send by default with every user.risk.detect event, and send our notification.
Implementing a flow like this leverages the power of Workflows and Okta Identity Threat Protection to give your team continuous real-time visibility into risk signals detected in your Okta tenant. It allows you to integrate different platforms you use to send notifications, create tickets, and automate responses, like quarantining the user in a high-risk group or triggering an incident with an SLA for response in another platform. The "High Risk" Okta group could be subject to strict policies that limit a user's access until your team has had a chance to investigate. Adding users to the group could trigger other flows, or you could even have stricter policies within Identity Threat Protection that apply to the group.