Sunset Expiration to Send Notification

Which IIQ version are you inquiring about?

8.3p2


I have the requirement to sunset expiration to send notification days before 14 and days before 1
But I could see in Global setting we cant send multiple notification.
How we can customize this feature?

Hi @DMalaghe1993

Since the out-of-the-box configuration doesn’t support multiple reminders for role expiry, you can try with a custom rule + RunRule task approach, and it works well.

  1. Custom Rule:
    Write a rule that loops through all identities, checks their assigned roles, and compares the role’s end date with the current date. If the role is set to expire in 14 or 1 day, it sends a reminder email.
import sailpoint.object.*;
import sailpoint.api.*;
import java.util.*;

Date now = new Date();
List identities = context.getObjects(Identity.class);

for (Identity identity : identities) {
    List<Assignment> assignments = identity.getAssignments();
    if (assignments == null) continue;

    for (Assignment assignment : assignments) {
        Date endDate = assignment.getEndDate();
        if (endDate == null) continue;

        long daysLeft = (endDate.getTime() - now.getTime()) / (1000 * 60 * 60 * 24);
        if (daysLeft == 14 || daysLeft == 1) {
            EmailOptions options = new EmailOptions();
            options.setTo(identity);
            options.setVariable("assignment", assignment);
            options.setVariable("identity", identity);
            context.sendEmail("roleExpiryReminder", options);
        }
    }
}
return "Role expiry notifications sent.";
  1. RunRule Task:
    Create a scheduled task of type RunRule that runs this rule daily. This way, users get timely reminders without any manual intervention.
  2. Email Template:
    Create a custom email template (roleExpiryReminder) that includes the role name and expiration date, and sends it to the user.

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