Get all identities for an entitlement

Hi,

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

Thanks,
Siva

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));
  qo.addFilter(appFilter);
  
  //Run a projection query to search for the objects
  Iterator iterator = context.search(IdentityEntitlement.class,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)iterator.next()[0];
    identityList.add(idty);
  }
  
  return identityList;