How we can make comments mandatory in access request for specific applications? Under Manage User Access Require Comments Settings how we can add the Configuration Rules?

Which IIQ version are you inquiring about?

Version 8.3

Please share any images or screenshots, if relevant.

SailPoint IdentityIQ - Configure IdentityIQ Settings.png

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

The access request comment is OOTB, if we enable “Require comments for all access items” it will be mandatory for all access request. How we can make the comment section madatory for specific application group access request.

@pradyutdas1984
Check example rule " Example Comment Config Rule" present in WEB-INF\config\examplerules.xml

This will help you to implement this, please go through below link

Requiring comments for access requests and approvals in IdentityIQ 8.2 - Compass (sailpoint.com)

1 Like

Thanks @iamksatish :slightly_smiling_face:

1 Like

@iamksatish , I have written the following code however during access request the rule is not getting executed

List result = new ArrayList();
System.out.println(“Entering to the rule>>>”);
// Check requestItem attribute to see if it has requiresComment enabled
if (requestedItem != null) {
System.out.println(“Entering to the request>>>>>” +requestedItem);
boolean required = false;

System.out.println("Entering to the require>>>>>" +required);

if (requestedItem instanceof ManagedAttribute) {
  System.out.println("Entering to the manage");
  String appName=((ManagedAttribute)requestedItem).getApplication().getName();
  System.out.println("Entering to the manage1");
  Custom reqCommAppListCustm=context.getObjectByName(Custom.class,"");
   System.out.println("Entering to the manage2");
  if(null!=reqCommAppListCustm) {
    List reqCommAppList = reqCommAppListCustm.get("APPLICATION_NAME");
    if(null!=reqCommAppList && !reqCommAppList.isEmpty()&& reqCommAppList.contains(appName)) {
      required = new Boolean(((ManagedAttribute)requestedItem).getAttribute("requiresComment"));
    }
  }
} 
if (required) {
  // in this case the required param is dynamic and depends on the extended attribute requiresAttachment
  result.add(new AccessRequestConfigDTO(required, "Comment required for requested item."));
}

}

return result;


@iamksatish

Is the rule failing at some point, or are there any errors?

Thanks for your response, the issue has been fixed now. I have figured out and fixed.

1 Like

@pradyutdas1984
Sorry, I missed your message just saw this thread after your latest message

Do you still need any help here.

No, the rule is working as exepected, thanks again @iamksatish

2 Likes

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