Identify Users Whose Status Changed X-number of Days Since Today in Okta Workflows

In this guide:

Okta Workflows guides

Okta Workflows guides are questions and answers from the community office hours, the #okta-workflows channel on MacAdmins Slack, and other places. Read all the other guides

How to identify users whose status changed x number of days since today?

Identifying users

For example, you need to find users de-provisioned 30 days ago. The following flow finds such users:

Identify users whose status changes x number of days before

The flow has the following cards:

  1. The Date & Time – Now card returns today’s date.
  2. The Date & Time – Subtract card subtracts x number of days from today’s date. For example, you need to find users whose status changed 30 or more days ago.
  3. The Text – Compose card creates the search query
    • The status is set to DEVPROVISIONED. You can use another status.
    • The statusChanged is the last time the status changed.
    • The statusChanged date is checked if it happened 30 days ago. You can use another number of days.
  4. The Okta – List User with Search card uses the query to find the users who were de-provisioned 30 days ago.

Identifying inactive Okta user template

A related solution is available in the Identify inactive Okta users’ template. This template searches for all users in an Okta tenant whose last login date was before a specific date.


Workflows resources

🍫 Get help from Workflows specialists during weekly community office hours.

📺 Learn from Workflows videos.

🛟 Get help from support: discuss a Workflows topic or ask a question.

🙋🏻‍♀️ Get help from the community: join the #okta-workflows channel on MacAdmins Slack.

4 responses to “Identify Users Whose Status Changed X-number of Days Since Today in Okta Workflows”

  1. Hi there, I’m testing out the workflow but for some reason the “List Users with Search” is returning a 400 Bad Request error. Ultimately I’d like to stream the output of the “List Users with Search” to a delete flow but need to solve the 400 error first.

    Any ideas what I might be doing wrong?

    1. Hi TheFourDees, can you share the flow screenshot and flow execution screenshot showing the error? You can also send it to max.katz@okta.com.

  2. Nevermind! I found the error of my ways…had an extra space in the text compose card somewhere! Thank you for your excellent work!

    1. Thank you, glad it’s working now!

Leave a Reply

Discover more from Max Katz

Subscribe now to keep reading and get access to the full archive.

Continue reading