<div dir="ltr"><div>Hi all,<br>We're implementing a mutually-exclusive role set in MidPoint using an exclusion policy constraint with action = prune:<br><br>Application:<br><b>- VPN</b><br><br>Application-roles:<br><b>- VPN-access <br>- VPN-manager<br>- VPN-admin</b><br><br>Only one of these three application roles should be assigned to a user at a time . And if there is a SOD situation detected  => select the application-role with highest rank (access -> manager -> admin) , and prune others. <br>Per the <a href="https://docs.evolveum.com/midpoint/reference/support-4.9/roles-policies/policies/policy-rules/#policy_actions">SOD actions documentation</a>, prune automatically and silently removes conflicting assignments when a new one is added. <br><br>Our question: does prune have any built-in mechanism to resolve conflicts based on role priority/order/rank (e.g. always keeping the highest-privilege role regardless of assignment sequence)? Or is the removal purely based on assignment order — i.e. the newest assignment always survives and the pre-existing conflicting assignment is the one pruned, regardless of relative privilege level?<br><br>If there's no built-in support for priority-based resolution, could you point us to the recommended pattern for enforcing "always keep highest-rank role" semantics — e.g. a policy rule script hook that runs before prune, or an object template / afterAssignments mapping approach?<br><br><br>Thanks,<br><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Bao Tran<div>Software developer</div></div></div></div>