Find Identities By Searchable IdentityAttribute Method

Hi!

I am working on service desk integration in which I need to create the ticket when user is onboarded (Identity Created) . In the onboarding ticket, I need to pass the comma separated employee id of direct reportee of a user onboaded if any. I added below piece of code for this-

String identityEmployeeId =null;
identityEmployeeId = identity.getStringAttribute("identificationNumber");

if(identityEmployeeId !=null)
	{
	   plan.put("identityEmployeeId", identityEmployeeId);	
	   
	   List list = idn.findIdentitiesBySearchableIdentityAttribute("manager", "Equals",identityEmployeeId , "manager");      
       String reportee="";
         for(int i=0; i <list.size();i++)
		 {
			sailpoint.rule.Identity id = (sailpoint.rule.Identity)list.get(i);
			 for (String attName : id.getAttributes().keySet()) {
              if (attName.equalsIgnoreCase("identificationNumber")) {
                String  newValue = (String) id.getAttributes().get(attName);  
                reportee = reportee+newValue +",";				          				
            }
          } 
			
		 }
		plan.put("identityDirectReportee", reportee);	 
	}

I got below error-
RuleExecutionException (ruleName=ServiceNow Service Desk): BSFException: The application script threw an exception: java.lang.IllegalStateException: Unable to search identities by identity attributes. BSF info:ServiceNow Service Desk at line: 0 column: columnNo, caused by org.apache.bsf.BSFException: The application script threw an exception: java.lang.IllegalStateException: Unable to search identities by identity attributes. BSF info: ServiceNow Service Desk at line: 0 column: columnNo.

“manager” identity attribute is OOTB searchable.

Any thoughts?

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