Hi all,
Can someone help with a code snippet to get all members for all entitlements in IIQ?
Thanks in advance
Hi all,
Can someone help with a code snippet to get all members for all entitlements in IIQ?
Thanks in advance
import java.util.*;
import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
import sailpoint.object.IdentityEntitlement;
QueryOptions qo = new QueryOptions();
Iterator itr = context.search(IdentityEntitlement.class,qo);
Map memberMap = new HashMap();
while(itr.hasNext()){
IdentityEntitlement entobj = itr.next();
QueryOptions qo1 = new QueryOptions();
qo1.addFilter(Filter.eq("value",entobj.getValue()));
Iterator itr1 = context.search(IdentityEntitlement.class,qo1,"identity.name");
List memberNameList = new ArrayList();
while(itr1.hasNext()){
Object[] obj = itr1.next();
memberNameList.add(obj[0]);
memberMap.put(entobj.getValue(),memberNameList);
}
}