
3dl5q (3dl5q) asked a question.
Hi there, we'd like to get a basic workflow automation for the following scenario:
1. We have a "Group 1", "Group 2" and "Group 3" with users in which all gives access to an application
2. We have a group rule that states all users from the Everyone group must be added into "Group 3"
3. However if users are in "Group 1" or "Group 2" they should be removed from "Group 3".
How would we go about actioning this in Workflows?

@3dl5q (3dl5q) This isn't a use case you would solve with Workflows. While it can be solved with Workflows you are far better off leveraging Group Rules with an Okta Expression that meets your use case.
For example in my test env:
28 total users.
1 deactivated user
4 unique users in group2/3 (1 is in both groups)
EVERYONE: 00g1sgh3rwQU8rpyu1d7
Group2 00g7ds0mjuIG4ATx41d7
Group3 00g7ds0pjixxCoNLN1d7
user.isMemberOfGroup("00g1sgh3rwQU8rpyu1d7") && !isMemberOfAnyGroup("00g7ds0mjuIG4ATx41d7","00g7ds0pjixxCoNLN1d7")
Results: 23 people assigned to Group1