Import and execute the below Rule to get the Identity details:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule created="1606561116525" id="4028de8175ff665c017609edaaed09f1" language="beanshell" modified="1606561116525" name="Get Identity Details">
<Description>Get Identity Details</Description>
<Source>
import java.util.List;
import java.util.Iterator;
import sailpoint.object.*;
Identity user = context.getObjectByName(Identity.class,"Richard.Jackson");
System.out.println("Identity Info for Richard.Jackson");
System.out.println("========================");
System.out.println("User Name = " + user.getName());
System.out.println("First Name = " + user.getFirstname());
System.out.println("Last Name = " + user.getLastname());
System.out.println("Full Name = " + user.getFullName());
//user.getManger() returns the Identity object of manager
System.out.println("Manager = " + user.getManager().getName());
System.out.println("Email Address = " + user.getEmail());
System.out.println("Status = " + user.getAttribute("status"));
System.out.println("Location = " + user.getAttribute("location"));
System.out.println("Region = " + user.getAttribute("region"));
//Check if the user is a manger for other Identity
System.out.println("\n\nIs the user Manager for any identity = " + user.getManagerStatus());
System.out.println("\nListing of Accounts");
System.out.println("========================");
List Links= (List) user.getLinks(); //Links represent application accounts correlated to an identity
if (null != Links) {
Iterator linkIterator = Links.iterator();
while (linkIterator.hasNext()) {
Link account = (Link) linkIterator.next();
System.out.println("Application Name = " + account.getApplicationName() + "; Account Name = " + account.getDisplayableName());
log.debug("Application Name = " + account.getApplicationName() + "; Account Name = " + account.getDisplayableName());
}
}
</Source>
</Rule>
Check the Logs for Results:
Comment below if you find this post helpful.