Remove Roles without Application

Which IIQ version are you inquiring about?

8.3

How do I remove roles that have no application through BeanShell? AccountRequest seems like the wrong approach, given there is no account (or is it “IIQ”)?

Hi @AJGibson76 - yes it is “IIQ”

Example:``
AccountRequest acctReq = new AccountRequest();
acctReq.setApplication("IIQ");
acctReq.setNativeIdentity(id.getName());
acctReq.setOperation(AccountRequest.Operation.Modify);

// Add the attribute requests to remove each of the Roles we need to remove.
for (String roleName : addBundleNames) {
AttributeRequest attrReq = new AttributeRequest("assignedRoles",
ProvisioningPlan.Operation.Remove, roleName);
acctReq.add(attrReq);
}

plan.add(acctReq);``