Hi @d_pustovoitov ,
When roles are removed, the associated entitlements are also removed from the user. However, if the “Retain assigned entitlements when roles are removed” option is enabled, the entitlements will not be removed.
Please check this option. Gear Icon —> Global Settings —> IdentityIQ Settings —> Roles tab.
Additionally, the nativeIdentity should be set on the accountRequest in the rule.
plan.setIdentity(identity);
AccountRequest accountRequest = new AccountRequest();
accountRequest.setApplication(appname);
accountRequest.setOperation(AccountRequest.Operation.Modify);
accountRequest.setNativeIdentity(idName);
