Short and handy Okta Workflows tips and tricks. Read the full series.
This tip is from Taz Rafiq.
When you grant app access for a fixed time through Okta Identity Governance (OIG), you can renew it only for people who still use the app. A single Okta-Search System Logs card can answer βHas this person signed in to this app in the last 30 days?β
Hereβs the setup. Access is granted for 90 days. On day 87, a flow runs this check. If the person signed in recently, the flow extends their access with the OIG-Create Request card, with Requested For set to that person. If not, access ends on day 90, and the license frees up.
The Helper Flow takes two inputs, user_id and app_id. A Text-Compose card builds the filter from them. Set the Okta-Search System Logs card like this:
- Search By: Expression, so you can write your own filter.
- Custom Filter: The output of the Text-Compose card.
- Since: Today minus 30 days. Use a Date & Time-Now card, then a Date & Time-Subtract card.
- Result Set: First Matching Record. One sign-in is enough to answer the question.
The filter looks for a successful SSO sign-in by this person to this app. The success check matters because the event also logs failed attempts:
eventType eq "user.authentication.sso" and outcome.result eq "SUCCESS" and actor.id eq "<user_id>" and target.id eq "<app_id>"
If the card returns a record, extend the access. If it returns nothing, let it expire.
If you leave Since empty, the card only searches the last 7 days. Someone who used the app two weeks ago would look inactive and lose access they still need.

Okta Workflows resources
- π New to Okta Workflows? The Getting Started with Okta Workflows page has all the resources to help you get started.
- πΊ Like learning from videos? Watch Okta Workflows videos.
- βHave a question? Ask during community office hours or post on the community forum.
- π¬ Want to learn from the community? Join the #okta-workflows channel on the Mac Admins Slack.
- π Want to learn more about identity automation? Take the Okta Workflows training on Okta Learning.
Leave a Reply