Which IIQ version are you inquiring about?
8.5P1
Please share any images or screenshots, if relevant.
Share all details about your problem, including any error messages you may have received.
Dear Team,
We are currently using Role SoD policies. As part of the violation detection process, we have configured reminder notifications to be sent to policy violation owners. Additionally, we would like to include the impacted users (identities) in the CC field of the same email.
However, we are facing an issue where:
- Violation owners are receiving the reminder notifications correctly.
- The users are not receiving the emails in CC.
- The CC variable (
$pv.identity.email) is not resolving and is instead being printed as-is.
Current Setup
We configured the CC field as:
cc=“$pv.identity.email”
The $pv object is expected to be populated via a custom rule defined at the email template level. The rule execution snippet is as follows:
#set($spctx=$spTools.class.forName(“sailpoint.api.SailPointFactory”).getMethod(“getFactory”, null).invoke(null, null).getCurrentContext())
#set($rule = $spctx.getObjectByName($spTools.class.forName(“sailpoint.object.Rule”), “POlicy Violation Work Group Members”))
#set($ruleArgs=$spTools.class.forName(“java.util.HashMap”).newInstance())
#set($dummy = $ruleArgs.put(“policyViolation”,$workItem.targetId))
#set($ruleOutput = $spctx.runRule($rule, $ruleArgs))
## Extract returned data
#set($pv = $ruleOutput.get(“violation”)) ## PolicyViolation object
#set($emails = $ruleOutput.get(“emails”))
#set($displayNames = $ruleOutput.get(“displayNames”))
#set($leftRoleDisplayName = $ruleOutput.get(“leftRoleDisplayName”))
#set($rightRoleDisplayName = $ruleOutput.get(“rightRoleDisplayName”))
Observed Problem
It appears that the email template variables are resolved before the rule is executed. As a result, $pv is not yet populated when the CC field is evaluated, leading to null or unresolved values.
We also attempted to use the out-of-the-box $workItem object, but since $workItem.targetId only contains an ID (and not the full object), accessing $workItem.targetId.identity.email does not work.
Question
Is there a recommended approach to:
- Dynamically include the policy violation identity’s email address in the CC field of reminder notifications?
- Or properly resolve variables from a rule so they can be used in the email template header (CC field)?
