Saturday, November 28, 2020

SailPoint IIQ Rule to fetch entitlements assigned to an Identity

Beanshell script to display all the entitlements assigned to an identity: 

import java.util.List;
import java.util.Iterator;
import sailpoint.object.*;
    
Identity user = context.getObjectByName(Identity.class,"Richard.Jackson");
    
System.out.println("Identity Name =" + user.getName());
       
// Get the list of entitlements
List<EntitlementGroup>  entitlementGroup = user.getExceptions();
   
if (entitlementGroup != null) {
System.out.println("Entitlements assigned: ");
    for(EntitlementGroup entGrp : entitlementGroup){
    List<String> entitlements = entGrp.getAttributes().getMap().get("groupmbr");
    for (String ent: entitlements){
    System.out.println(ent);
           }
    }
   }


Execute the rule and check the results:



Comment below if you find this post helpful.

No comments:

Post a Comment

Form AllowedValues rule to filter Identities with Active Regular Active Directory accounts and identity is active and correlated

 The rule type is AllowedValues. import org.apache.log4j.Level ; import org.apache.log4j.Logger ; import sailpoint.object.Filter ; import sa...