Audit events in Track Requests?

Which IIQ version are you inquiring about?

Version 8.4

Share all details related to your problem, including any error messages you may have received.

Hello

We are removing some entitlements based on inactivity. We’re doing this here:
AttributeRequest attrReqIIQ=new AttributeRequest(“assignedRoles”,ProvisioningPlan.Operation.Remove, entName);

This is in a scheduled task that we run. The tasks checks the last login date and removes entitlements if the last login date is greater than a certain date.

Is it possible to audit this in track requests?

Hi @ralfonse

I think we can do, you should pass identityRequest Number and play with it

IdentityRequest ir = new IdentityRequest();
ir = context.getObjectByName(IdentityRequest.class, idRNum);

Here you will get the object, now u can create IdentityRequestItem or and save in IR,

Like example


``
IdentityRequest YOURIR = new IdentityRequest();
YOURIR = context.getObjectByName(IdentityRequest.class, idRNum);

IdentityRequestItem IRI = new IdentityRequestItem();
			IRI.setApplication(appName);
			IRI.setName("Your IRII Name");
			IRI.setOperation("IRIType");
			IRI.setValue(YourGroupName);
			IRI.setProvisioningState(ApprovalItem.ProvisioningState.valueOf("Finished"));
			IRI.setApprovalState(WorkItem.State.valueOf("Finished"));
			YOURIR.add(IRI);
			context.saveObject(YOURIR);
			context.commitTransaction();

This is just code sample. but you will get idea how you can achieve it.

Thanks,
Pravin

Since you are using the custom Rule to perform this operation , Pretty much you can use AuditEvent Class to do custom auditing .

below is the sample code . you can modify based on your requirement .

import sailpoint.api.SailPointContext;
import java.text.SimpleDateFormat;
import sailpoint.object.AuditEvent;
 
  public void customAudit(SailPointContext context) throws GeneralException{
  SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
  format.setTimeZone(TimeZone.getTimeZone("CST"));
  AuditEvent auditEvent = new AuditEvent();
  auditEvent.setAction("Custom Action");
  auditEvent.setSource("Custom Source");
  auditEvent.setTarget("vkejriwal");
  auditEvent.setString1("Timestamp: " + format.format(new Date()));
  auditEvent.setString2("User Name: " + "vkejriwal");
  auditEvent.setString3("IP: " + "127.0.0.1");
  context.saveObject(auditEvent);
  context.commitTransaction();
  
 }

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.