I was inspired to build this to help someone who made this post.
The idea is that you are using a “PreHires” group in Okta to give users access to certain things before their start date, then want to remove them from that group to give them wider access on their start date.
To achieve this, I use a scheduled flow to list members of the PreHire group. In the flow, I also use the “Current Time” from the scheduled event card and a Date function to (optionally) convert the timestamp into your timezone.
I then stream the current time and each group member to a helper flow, which compares the current time to the hire date from the user’s profile. If the current time is equal to or greater than the hire time from the profile, the user is removed from the PreHire group.
Download the flow:
removeUsersFromPrehireGroup.folder (30.5 KB)
To get this working in your org:
- Change the Group ID to your PreHire group (it appears once in both the helper and parent flow in each Okta card)
- Change the Object - Get Multiple in the helper to retrieve the correct custom attribute from your user profile schema.
- Finally, you may need to work with the date comparisons to ensure you compare similar formats, etc.
- Things will generally work best using the same ISO/UTC timestamp format generated by the “Date - Now” card in Workflows in your user’s profiles.
Screenshots
User removed from group
User who was not removed from group
Parent Flow