
7jv04 (7jv04) asked a question.
Hi All!
Pretty new to the workflow game here. I'm trying to build what sounded like a simple idea for a workflow that finds all Okta users who are not in Active status. So far I haven't quite been able to figure it out. There is no "does not equal" operator like ne in the expression language syntax. That would have made it too easy right? ;) At least not that I've found that works in the Custom Search Criteria field. The desired outcome is a table of all users/profiles in the Okta tenant that are in a status not equal to Active. The "Identify Inactive Okta Users" template for example would have been perfect if the "List Users with Search" card let you choose "any" status instead of a single status. Maybe there is a way to alter the card so that it takes a string of profile statuses? For this use case I specifically want to create a list of Okta profiles in any other status than Active. Anyone solved for this before or has a good idea how?

@7jv04 (7jv04)
You will need to go about it a different way since the built-in cards only provide a single selection of a status. To do this task you will need to leverage List Users with Search and leverage the Custom Search Criteria. You would then buildout your custom query to pull in the statuses you want to return and exclude the ones you don't want returned.
The list of status's are located here (use API column)
https://help.okta.com/en-us/content/topics/users-groups-profiles/usgp-end-user-states.htm
The structure of the query will be derived from the List Users With Search API endpoint documentation found here:
https://developer.okta.com/docs/reference/api/users/#list-users-with-search
I've attached a creative little flow I just constructed that allows you to toggle the status values you want to True or False in the assign card at the start of the flow. It will dynamically build out the query.
Edit: Noticed some errors in my initial post. Its correct now.
findusersbystatus