To verify if a specific identity lifecycle event was triggered for an identity, you can usually find this information in the Events tab of the identity in the GUI. However, if you need to retrieve this information using Beanshell, you’ll need to check the corresponding AuditEvent in the AuditLog.
Generally, the Events tab in the Identity section fetches information about lifecycle events from the AuditLog. Therefore, to determine if a particular lifecycle event was triggered, you should search for the corresponding AuditEvent in Beanshell.
Below are the steps to accomplish this:
-
Viewing Identity Events in GUI:
-
Example Retrieving LifecycleEvent in Beanshell:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule language="beanshell" name="Check Identity Lifecycle Events">
<Source>
import sailpoint.object.AuditEvent;
import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
String identityName = "103";
Filter f1 = Filter.eq("target","Identity:"+identityName);
Filter f2 = Filter.eq("action","identityLifecycleEvent");
QueryOptions qo = new QueryOptions();
qo.add(Filter.and(f1,f2));
List auditEvents = context.getObjects(AuditEvent.class,qo);
List processedEvents = new ArrayList();
for(AuditEvent event : auditEvents) {
processedEvents.add(event.getString1());
}
return processedEvents;
</Source>
</Rule>