<Field displayName="identities" helpKey="help_rept_identity_entitlement_identities" multi="true" name="identity" value="ref:identity"> <AllowedValuesDefinition> <Script> <Source> import sailpoint.object.*; import java.util.*; import org.apache.log4j.Logger; String idName = context.getUserName(); List identityList3 = new ArrayList(); QueryOptions qo = new QueryOptions(); qo.addFilter(Filter.eq("manager.name", idName)); List identityList = context.getObjects(Identity.class, qo); for(Identity id : identityList){ List identityList2 = new ArrayList(); identityList2.add(id.getId()); identityList2.add(id.getName()); identityList3.add(identityList2); } return identityList3; </Source> </Script> </AllowedValuesDefinition> </Field>
OOTB Identity Entitlements Detail Report shows all the Application in the Search, so if we want to modify this report and show only the Application which has application owner as the logged in user, we need to modify the existing form which is used in this report "Identity Entitlements Report Search Fields", Go to Debug page and search for the form "Identity Entitlements Report Search Fields", Now in we need to replace
<Field displayName="applications" helpKey="help_rept_identity_entitlement_applications" multi="true" name="application" type="Application" value="ref:application"> <AllowedValuesDefinition> <Script> <Source> import sailpoint.api.SailPointContext; import sailpoint.object.Application; import sailpoint.object.Identity; import sailpoint.object.QueryOptions; import sailpoint.api.ObjectUtil; import sailpoint.object.Filter; String idName = context.getUserName(); List appList3 = new ArrayList(); if (idName != null) { QueryOptions ao = new QueryOptions(); ao.addFilter(Filter.eq("owner.name",idName)); List appList=context.getObjects(Application.class, ao); for(Application app : appList){ List appList2 = new ArrayList(); appList2.add(app.getId()); appList2.add(app.getName()); appList3.add(appList2); System.out.println("*****"+ app.getId() + "*********" + app.getName()); } } return appList3; </Source> </Script> </AllowedValuesDefinition> </Field>
I have one requirement in this report I want to display Identities Account Status(enabled/disabled) in output . Please suggest . What to add in form .
Vishal,
I have a similar requirement where we need to limit the Application list shown in the dropdown. The solution works, but how about the scenario where a user simply runs the report without choosing an Application from the list? For me, it shows a report for all Applications. Any thoughts?
Thanks,
Rakesh