Hi,
When an access profiles owner leaves the company, we need to send a notification to a group (DL) that lists all the access profiles they were in charge of, their display name, and who their manager is. Below is the workflow that isn’t working, also need to know how to include the list in the send email action, please assist.
{
“name”: “Check Access Profile Ownership on Termination”,
“description”: “Iterates through access profiles when an identity is terminated, checks if they are an owner of any access profiles, and sends an email notification for each profile that needs an owner update”,
“definition”: {
“start”: “Get Identity”,
“steps”: {
“End Step - Success”: {
“actionId”: “sp:operator-success”,
“displayName”: “End Workflow”,
“type”: “success”
},
“Get Access”: {
“actionId”: “sp:access:get”,
“attributes”: {
“accessprofiles”: true,
“entitlements”: false,
“getAccessBy”: “specificIdentity”,
“identityToReturn.$”: “$.trigger.identity.id”,
“roles”: false
},
“displayName”: “Get Access Profiles”,
“nextStep”: “Loop Through Access Profiles”,
“type”: “action”,
“versionNumber”: 1
},
“Get Identity”: {
“actionId”: “sp:get-identity”,
“attributes”: {
“id.$”: “$.trigger.identity.id”
},
“displayName”: “Get Terminated Identity”,
“nextStep”: “Get Identity 1”,
“type”: “action”,
“versionNumber”: 2
},
“Get Identity 1”: {
“actionId”: “sp:get-identity”,
“attributes”: {
“id.$”: “$.getIdentity.managerRef.id”
},
“displayName”: “”,
“nextStep”: “Get Access”,
“type”: “action”,
“versionNumber”: 2
},
“Loop Through Access Profiles”: {
“actionId”: “sp
iterator”,
“attributes”: {
“input.$”: “$.getAccess.accessItems”,
“loopInput.$”: “$.getAccess”,
“start”: “Send Email”,
“steps”: {
“End Loop”: {
“actionId”: “sp:operator-success”,
“displayName”: “End Loop”,
“type”: “success”
},
“Send Email”: {
“actionId”: “sp:send-email”,
“attributes”: {
“body”: “The access profile ‘${accessProfileName}’ (ID: ${accessProfileId} needs a new owner ‘${manager}’ as the current owner ‘${displayName}’ has been terminated.”,
“context”: {
“accessProfileId.$”: “$.loop.loopInput.id”,
“accessProfileName.$”: “$.loop.loopInput.name”,
“displayName.$”: “$.getIdentity.attributes.displayName”,
“manager.$”: “$.getIdentity1.attributes.displayName”
},
“recipientEmailList”: [
“123@test.org”
],
“subject”: “Access Profile Ownership Update Required”
},
“displayName”: “Send Notification Email”,
“nextStep”: “End Loop”,
“type”: “action”,
“versionNumber”: 2
}
}
},
“displayName”: “Iterate Through Access Profiles”,
“nextStep”: “End Step - Success”,
“type”: “action”,
“versionNumber”: 1
}
}
},
“enabled”: false,
“executionCount”: 2,
“failureCount”: 0,
“trigger”: {
“type”: “EVENT”,
“attributes”: {
“filter.$”: “$.changes[?(@.attribute == “cloudLifecycleState” && @.newValue== “terminated” )]”,
“id”: “idn:identity-attributes-changed”
}
}
}



