Hi Veronica,
If I understood correctly, then it is a sticky entitlement issue. Basically, if the access is requested through IDN, then it takes the IDN source as authoritative for the entitlement, hence it will not replace it easily. If you try, then it will try to re-add.
To handle this, you may need to write the logic to handle the stickiness in the Before Provisioning rule.
AttributeRequest attrRequest= new AttributeRequest(entName,ProvisioningPlan.Operation.Remove,ent);
attrRequest.put(“assignment”, true);
accRequest.add(attrRequest);
Thanks