Using IDNRuleUtil findIdentitiesBySearchableIdentityAttribute function

Hi,

We are trying to use the idn.findIdentitiesBySearchableIdentityAttribute function in IDNRuleUtil class following the documentation here : Using IDNRuleUtil as a Wrapper for Common Rule Operations - Compass

We are getting a class cast exception : sailpoint.tools.GeneralException: The application script threw an exception: java.lang.ClassCastException: Cannot cast sailpoint.object.Identity to sailpoint.rule.Identity BSF info: AD Group Removal at line: 0 column: columnNo

Is there an issue with the documentation above?

Does this function findIdentitiesBySearchableIdentityAttribute return an sailpoint.object.Identity list?

Here is our code snippet for an example to return all identities with an employeeNumber starting with 123.

List<sailpoint.rule.Identity> identities = idn.findIdentitiesBySearchableIdentityAttribute(“employeeNumber”, “StartsWith”, “123”, “employeeNumber”);

if( identities != null && identities.size() > 0) {
	for(int i = 0; i < identities.size(); i++) {

// do something with identities.get(i).getAttribute(“XYZ”)
}
}

1 Like

Are you importing sailpoint.rule.Identity? It should be sailpoint.object.Identity

We type casted the list to sailpoint.rule.Identity as per the documentation.

I will ask ES team to update the rule and try the sailpoint.object.Identity instead.