Custom report for audit events

Hi all,

How can I create a custom report to have audit events and employeetype of a user?

Thanks in advance

hi @rishavghoshacc

Please, could you specify exactly what event details do you need register to show in your report?

The Advanced Analytics Audit Search page provides user visibility to audit events recorded by the system. Click Intelligence > Advanced Analytics and change Search Type to Audit to access that page.

You can add any filter and export the result.

If you want create a custom report, you can use the following link. Audit Configuration in IdentityIQ - Compass

@ismaelmoreno1 I am able to get the audit event that I wanted but also need the employeetype field for the record which is not available for the event. Any idea on how to achieve this?

Hi @rishavghoshacc if you are storing employeeType details in your AuditEvent, then you can fetch the details. Are you storing the employeeType information anywhere in String 1 to 4 or in attributes of AuditEvent ?

@Arpitha1 I guess not. How can I store that in the values?

@rishavghoshacc You can refer this link for creating custom audit.

Refer this link to know how to fetch it

HI @rishavghoshacc

The recommended best practice is to create audit configuration entries (as AuditActions in the AuditConfig object) for these custom events so auditing can be turned on and off for custom events the same way it can be for built-in events. A custom AuditConfig entry looks like this:

<AuditConfig name="AuditConfig">
<AuditActions> 

 ....
    <AuditAction displayName="Custom event" enabled="true" name="Custom event"/>
  </AuditActions>

This example rule creates a custom audit event. You shouLd include this code in the process that you need audit:

import sailpoint.server.Auditor;
import sailpoint.object.AuditEvent;

String action = "Custom even"
if (Auditor.isEnabled(action)) {

	AuditEvent event = new AuditEvent();
	event.setSource(identitySource.getName()); // source is the Identity performing the action 
	event.setTarget(identityTarget.getName());  //usually the name of a SailPointObject on which the audited action occurred
	event.setAction(action);
	setAttribute("employeeType", identityTarget.getAttribute("employeeType"))
	Auditor.log(event);

    context.saveObject(event );
    context.commitTransaction();

}

@rishavghoshacc If you are not storing employee type then you can create custom report with filter or anything. in Report filed u can add employee type there you can write code to get employee type from employee , employee details you are already getting so just do this it will help.