Get all identities for an entitlement


Is there any rule to get all identities for an entitlement?


1 Like

Instead of rule, you can use advance analytics filter itself. there is an option to filter based on entitlement

Like @rohit_jaiswal1 mentioned, the easiest way to do this is to use Advanced Analytics. However, if you do want to write a rule, here is an example that should get you started. Updated to add filter on both Entitlement Value and Application Name

   import sailpoint.object.Application;
  import sailpoint.object.IdentityEntitlement;
  import sailpoint.object.Filter;
  import sailpoint.object.QueryOptions;
  import java.util.List;
  //Setup Query and Filters
  QueryOptions qo = new QueryOptions();
  List properties = Arrays.asList("identity");  
  Application app = context.getObjectByName(Application.class,"AWS Cloud");    
  Filter appFilter = Filter.and(Filter.eq("value","AWSAdministratorAccess - Sandbox - GRP-FNHW-AWS"),Filter.eq("application",app));
  //Run a projection query to search for the objects
  Iterator iterator =,qo,properties);
  List identityList = new ArrayList();
  while (iterator.hasNext()){
    //I'd do a bit of type checking and error handling here, but this illustrated the point.
    Identity idty = (Identity)[0];
  return identityList;
1 Like