# Find Identities By Searchable IdentityAttribute Method

**URL:** <https://developer.sailpoint.com/discuss/t/find-identities-by-searchable-identityattribute-method/99439>\
**Category:** SHF Discussion and Questions\
**Tags:** identity-security-cloud, rules\
**Created:** [January 30, 2025, 7:24am UTC](https://developer.sailpoint.com/discuss/t/find-identities-by-searchable-identityattribute-method/99439 "2025-01-30T07:24:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepakarora](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@deepakarora](https://developer.sailpoint.com/discuss/u/deepakarora)\
**Post date:** [January 30, 2025, 7:24am UTC](https://developer.sailpoint.com/discuss/t/find-identities-by-searchable-identityattribute-method/99439/1 "2025-01-30T07:24:57Z")

</div>

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-

```auto
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?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [March 31, 2025, 7:25am UTC](https://developer.sailpoint.com/discuss/t/find-identities-by-searchable-identityattribute-method/99439/2 "2025-03-31T07:25:39Z")

</div>

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