I am getting somthing different value in my custom report

Which IIQ version are you inquiring about?

Version 7.3

Share all details related to your problem, including any error messages you may have received.

HI All,

I am making custom report for access request report. I am not able to get NativeIdentity. I dont know why my value is comming different(2valuestring:: 0057Z00000AQLs1QAH). I want to get firstName from propery.


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<TaskDefinition created="1704786335039" executor="sailpoint.reporting.LiveReportExecutor" name="Access Request Advanced Status Report - Manager" progressMode="Percentage" resultAction="Rename" subType="Lifecycle Manager Reports" template="true" type="LiveReport">
  <Attributes>
    <Map>
      <entry key="auditEventTypes">
        <value>
          <List>
            <String>AccessRequest</String>
            <String>EntitlementsRequest</String>
            <String>RolesRequest</String>
          </List>
        </value>
      </entry>
      <entry key="report">
        <value>
          <LiveReport title="Access Request Status Report">
            <DataSource type="Hql">
              <Query>

                from IdentityRequestItem iri,IdentityRequest ir, Application app where iri.identityRequest = ir.id and iri.application = app.name and iri.operation != 'Set'

              </Query>
              <QueryParameters>
                <Parameter argument="applications"/>
                <Parameter argument="targetIdentities"/>
                <Parameter argument="requestors"/>
                <Parameter argument="entitlements"/>
                <Parameter argument="status"/>
                <Parameter argument="requestedDateStart"/>
                <Parameter argument="requestedDateEnd"/>
                <Parameter argument="completionDateStart"/>
                <Parameter argument="completionDateEnd"/>
              </QueryParameters>
              <QueryScript>
                <Source>
  System.out.println("1");
                  import java.util.*;

                  List application = args.get("applications");

                  List target = args.get("targetIdentities");

                  List requester = args.get("requestors");

                  List entitlement = args.get("entitlements");

                  String status = args.get("status");

                  Date reqStartDate = args.get("requestedDateStart");

                  Date reqEndDate = args.get("requestedDateEnd");

                  Date compStartDate = args.get("completionDateStart");

                  Date compEndDate = args.get("completionDateEnd");



                  if(application != null &amp;&amp; !application.isEmpty()){

                  query = query + " and app.id in (:applications)";
                  

                  }

                  if(target !=null &amp;&amp; !target.isEmpty()){

                  query = query + " and ir.targetId in (:targetIdentities)";

                  }

                  if(requester !=null &amp;&amp; !requester.isEmpty()){

                  query = query + " and ir.requesterId in (:requestors)";

                  }

                  if(entitlement !=null &amp;&amp; !entitlement.isEmpty()){

                  query = query + " and iri.value in (:entitlements)";

                  }

                  if(status !=null &amp;&amp; !status.isEmpty()){

                  query = query + " and iri.approvalState in (:status)";

                  }

                  if(reqStartDate !=null){

                  query = query + " and ir.created >= :requestedDateStart";

                  }

                  if(reqEndDate !=null){

                  query = query + " and ir.created &lt;= :requestedDateEnd";

                  }

                  if(compStartDate !=null){

                  query = query + " and ir.endDate >= :completionDateStart";

                  }

                  if(compEndDate !=null){

                  query = query + " and ir.endDate &lt;= :completionDateEnd";

                  }

                  return query;

                </Source>
              </QueryScript>
            </DataSource>
            <Columns>
              <ReportColumnConfig field="requestId" header="Access Request ID" property="ir.name" sortable="true" width="110"/>
              <ReportColumnConfig field="requester" header="Requester" property="ir.requesterDisplayName" sortable="true" width="110"/>
              <ReportColumnConfig field="requestee" header="Requested For" property="ir.targetDisplayName" sortable="true" width="110"/>
              <ReportColumnConfig field="requestDate" header="Request Date" property="ir.created" sortable="true" width="110"/>
              <ReportColumnConfig field="operation" header="Operation" property="iri.operation" sortable="true" width="110"/>
              <ReportColumnConfig field="application" header="Application" property="iri.application" sortable="true" width="110"/>
              <ReportColumnConfig field="account" header="Account" property="iri.nativeIdentity" sortable="true" width="110"/>
              <ReportColumnConfig field="entitlement" header="Entitlement" property="iri.name" sortable="true" width="110"/>
              <ReportColumnConfig field="entitlementValue" header="Entitlement Value" property="iri.value" sortable="true" width="110"/>
              <ReportColumnConfig field="status" header="Status" property="iri.approvalState" sortable="true" width="110"/>
              <ReportColumnConfig field="completionDate" header="Date of approval" property="ir.endDate" sortable="true" width="110"/>
              <ReportColumnConfig field="firstName" header="First Name" property="iri.nativeIdentity" sortable="true" width="110">
                <RenderScript>
                  <Source>
                    System.out.println("2");
                    import java.util.*;
                    import sailpoint.object.*; 
                    String firstName="";
                     // System.out.println("2valuestring:: "+iri.nativeIdentity);
                     System.out.println("2value:: "+value);
                    /*
                    
                    System.out.println("2.01");            

                    if(null != value){
                    System.out.println("2.1");

                    String ntIdentity=value;
                      System.out.println("2value:ntIdentity: "+ntIdentity);
                    if(value.contains("uid=")){

                    String[] parts= value.split("uid=");
                    if(parts.length>1){
                    ntIdentity= parts[1].split(",")[0];
                    System.out.println("2.2");
                    }

                    }

                    Identity requestee = context.getObjectByName(Identity.class,ntIdentity);

System.out.println("2.3");

                    firstName = requestee.getAttribute("firstname");


                    return firstName;   
                    }   */
System.out.println("2.4");

         

                  </Source>
                </RenderScript>
              </ReportColumnConfig>
            </Columns>
          </LiveReport>
        </value>
      </entry>
      <entry key="reportTitle" value="rept_lcm_entitlement_request_status_title"/>
    </Map>
  </Attributes>
  <Description>Displays information about access requests from LCM in detailed format.</Description>
  <Signature>
    <Inputs>
      <Argument multi="true" name="applications" type="Application">
        <Description>rept_input_lcm_request_status_report_apps</Description>
      </Argument>
      <Argument multi="true" name="approvers" type="Identity">
        <Description>rept_input_lcm_request_status_report_approver</Description>
      </Argument>
      <Argument multi="true" name="requestors" type="Identity">
        <Description>rept_input_lcm_request_status_report_requester</Description>
      </Argument>
      <Argument multi="true" name="entitlements" type="sailpoint.object.IdentityItem">
        <Description>rept_input_lcm_request_status_report_entitlements</Description>
      </Argument>
      <Argument multi="true" name="targetIdentities" type="Identity">
        <Description>rept_input_lcm_request_status_report_target_identity</Description>
      </Argument>
      <Argument name="status" type="string">
        <Description>rept_input_lcm_request_status_report_status</Description>
      </Argument>
      <Argument name="requestDateRange" type="daterange">
        <Description>rept_input_lcm_request_status_report_status</Description>
      </Argument>
      <Argument name="completionDateRange" type="daterange">
        <Description>rept_input_lcm_request_status_report_status</Description>
      </Argument>
    </Inputs>
  </Signature>
</TaskDefinition>

Hi @amanKsingh,

i think the problem is on hql query:

you cant correlate an identity to a request directly. The correlation is Identity->Entitlement->Request o viceversa.
look the object:
https://community.sailpoint.com/t5/Technical-White-Papers/IdentityIQ-Object-Model-and-Usage/ta-p/75090

ps. if you want, you can use sql too instead hql

1 Like

That looks like a Salesforce entitlement ID, which is what I’d expect for the native ID of an IdentityRequestItem (i.e., the requested entitlement).

You’re pulling the targetDisplayName off the Identity Request (ir), but there is also a targetId field. You can join via that to the Identity, and then you won’t need to extract the first name via code at all.

How I can join please help?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.