In my Sailpoint I have an IT Role that have a Provisioning Policy
That Provisioning Policy have a form with field memberOf and the value of this field is a rule
The rule that will validate who the user is and based on their department, it returns a Dn from an AD group and assigned this group to the user.
The issue is that the user for some reason may already have one group of this kind.
I modified the rule to validate and remove the group if there is one.
My issue is that if I run the rule it works. there is it return the correct DN and removes if there is anything to remove
If the rule runs automatically (For example if use chanmge department) it goes to a loop
Do you have two different IT roles with different set of AD groups? If yes, you can put a check if IT role is already assigned to a user. Or even in case of AD groups you can check if its already provisioned on user’s AD account and then take further action.
For example, IT Role 1 → with entitlement - groupDN = “CN= XYZ” + domain;
IT Role 2 → with entitlement - groupDN = “CN= yyy” + domain;
So if the user does not meet certain criteria condition then you can write a logic to remove associated IT role. You can try out this approach if it works for you.
I would do it like this, that in the provisioning form, you calculate the correct group in which the user has to be assigned to.
In a BeforeProvisiong Rule, then you could check if the provisioning plan contains the add operation of a department group and modify the plan by adding attribute requests with the remove operation, if the user has these roles. I guess it would be more efficient if you actually use an AfterProvisioning rule, where you additionally check if the operation to add a department group, was committed or filtered, and only in case it was commited, you would change the plan, by adding the groups to be removed.