Hi all,
I am trying to write a filter to get the ManagedAttributes for a certain application with a certain owner
Can someone assist.
Thanks in advance
Hi all,
I am trying to write a filter to get the ManagedAttributes for a certain application with a certain owner
Can someone assist.
Thanks in advance
Hi Rishav,
this Filter would do the job:
Filter.and(Filter.eq("application.name", "YOUR_APP_NAME"),
Filter.eq("owner.name", "OWNER_NAME"));
Br,
Renad
import sailpoint.object.Identity;
import sailpoint.object.Filter;
import org.apache.log4j.Logger;
import sailpoint.object.ManagedAttribute;
import sailpoint.object.QueryOptions;
import java.util.Iterator;
Logger logger=Logger.getLogger("com.identityclasses.rules");
Filter appFilter=Filter.eq("application.name","Active Directory");
Identity owner = context.getObjectByName(Identity.class, "1b2a3b4e");
Filter ownerFilter=Filter.eq("owner",owner);
Filter combinedFilter = Filter.and(appFilter, ownerFilter);
QueryOptions qo=new QueryOptions();
qo.add(combinedFilter);
Iterator it=context.search(ManagedAttribute.class,qo);
while(it.hasNext())
{
ManagedAttribute ma=it.next();
logger.info("Disaplay Name::"+ma.getDisplayName());
logger.info("Entitlement Value::"+ma.getValue());
logger.info("Entitlement Attribute::"+ma.getAttribute());
logger.info("Application Name::"+ma.getApplication().getName()+"\n");
}
Thanks @rquku . This worked
Thanks @officialamitguptaa . This worked