# How to get list of triggered identity lifecycle events for certain identity

**URL:** <https://developer.sailpoint.com/discuss/t/how-to-get-list-of-triggered-identity-lifecycle-events-for-certain-identity/58438>\
**Category:** IIQ Community Knowledge Base\
**Tags:** rules, identityiq\
**Created:** [May 29, 2024, 8:34pm UTC](https://developer.sailpoint.com/discuss/t/how-to-get-list-of-triggered-identity-lifecycle-events-for-certain-identity/58438 "2024-05-29T20:34:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjakubiak](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kjakubiak/32/7052_2.png) [@kjakubiak](https://developer.sailpoint.com/discuss/u/kjakubiak)\
**Post date:** [May 29, 2024, 8:34pm UTC](https://developer.sailpoint.com/discuss/t/how-to-get-list-of-triggered-identity-lifecycle-events-for-certain-identity/58438/1 "2024-05-29T20:34:21Z")

</div>

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:

1. **Viewing Identity Events in GUI** :  

2. **Example Retrieving LifecycleEvent in Beanshell** :

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

```

---

<div class="post-metadata">

**Author:** ![soswain](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@soswain](https://developer.sailpoint.com/discuss/u/soswain)\
**Post date:** [May 30, 2024, 6:31am UTC](https://developer.sailpoint.com/discuss/t/how-to-get-list-of-triggered-identity-lifecycle-events-for-certain-identity/58438/2 "2024-05-30T06:31:11Z")

</div>

@kjakubiak  
This is useful.  
I wanted to know about any other objects which can be used instead of Audit to get the lifeCycleEvents of an user.  
As these values are shown in the identity UI, I am assuming there will be some other objects which can be used for achieving this.

Any pointers?

---

<div class="post-metadata">

**Author:** ![kjakubiak](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kjakubiak/32/7052_2.png) [@kjakubiak](https://developer.sailpoint.com/discuss/u/kjakubiak)\
**Post date:** [May 30, 2024, 6:45am UTC](https://developer.sailpoint.com/discuss/t/how-to-get-list-of-triggered-identity-lifecycle-events-for-certain-identity/58438/3 "2024-05-30T06:45:14Z")

</div>

Hi Soumyakanta,  
Actualy what we see in GUI IS and audit event, I did a test and if you remove audit event than the entry on Events page on Identity will also disapear.

I used to check if event was triggered also by checking if TaskResult of the workflow execution exists. This approach however has some limitation like eg. tasks results rotation which can remove tasks results after certain time.

---

<div class="post-metadata">

**Author:** ![bellamkonda\_vb](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bellamkonda\_vb](https://developer.sailpoint.com/discuss/u/bellamkonda_vb)\
**Post date:** [May 30, 2024, 7:54am UTC](https://developer.sailpoint.com/discuss/t/how-to-get-list-of-triggered-identity-lifecycle-events-for-certain-identity/58438/4 "2024-05-30T07:54:20Z")

</div>

@soswain, I don’t think so apart from audit events.

---

<div class="post-metadata">

**Author:** ![soswain](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@soswain](https://developer.sailpoint.com/discuss/u/soswain)\
**Post date:** [May 30, 2024, 12:13pm UTC](https://developer.sailpoint.com/discuss/t/how-to-get-list-of-triggered-identity-lifecycle-events-for-certain-identity/58438/5 "2024-05-30T12:13:20Z")

</div>

Thanks @kjakubiak for explaining.
