Hi @BCyr,
Please note that within the “Provisioning Completed” trigger, you do not have direct access to roles or access profiles that have been granted. Instead, you can only access the provisioning plan, which contains information about sources, entitlements to add or remove in target systems, and other attribute modifications or enable/disable operations.
Therefore, with this solution, you can send an email based on entitlement assignments.
Also, in your workflow, you need to pass the following input:
$.trigger.accountRequests[*].attributeRequests[?(@.attributeName == "memberOf" && @.operation == "Add")]
or
$.trigger.accountRequests[*].attributeRequests[?(@.attributeName == "memberOf")]
Here, “memberOf” is specific to Active Directory. The first JSONPath filter will retrieve all “Add” operations on “memberOf” (i.e., adding an AD group). The second filter will retrieve all provisioning operations on “memberOf” (i.e., adding or removing an AD group to an account).
Below is an example of the “Provisioning Completed” trigger input (example from SailPoint documentation):
{
"trackingNumber": "4b4d982dddff4267ab12f0f1e72b5a6d",
"action": "IdentityRefresh",
"requester": {
"id": "2c91808b6ef1d43e016efba0ce470906",
"name": "Adam Admin",
"type": "IDENTITY"
},
"recipient": {
"id": "2c91808b6ef1d43e016efba0ce470909",
"name": "Ed Engineer",
"type": "IDENTITY"
},
"errors": [
"General Error",
"Connector AD Failed"
],
"warnings": [
"Notification Skipped due to invalid email"
],
"sources": "Corp AD, Corp LDAP, Corp Salesforce",
"accountRequests": [
{
"source": {
"id": "4e4d982dddff4267ab12f0f1e72b5a6d",
"name": "Corporate Active Directory",
"type": "SOURCE"
},
"accountId": "CN=example,ou=sample,ou=test,dc=ex,dc=com",
"accountOperation": "Modify",
"provisioningResult": "committed",
"provisioningTarget": "Corp AD",
"ticketId": "72619262",
"attributeRequests": [
{
"operation": "Add",
"attributeName": "memberOf",
"attributeValue": "CN=admin,DC=training,DC=com"
}
]
}
]
}
You must pay attention to the provisioningResult for each accountRequests entry, which indicates whether the user was successfully added to a group or not.
Additionally, for your use case, you should investigate whether using Out-of-the-Box Email notifications can help you.