I have written an offboarding Workflow for immediate terminations. The sequence of events is as follows:
- Authorized HR user logs into EntraID Identity Governance Lifecycle Workflows and triggers the “immediate termination” Workflow for the user to be terminated.
- The Workflow uses a Custom Extension to trigger a Logic App (the built-in Workflow offboarding options were not sufficient for my org, so I elected to use an Automation runbook).
- The Logic App triggers an Automation Account Runbook (PowerShell) that does all the work of resetting passwords, disabling the account, revoking sessions, removing licenses, revoking authentication methods, etc, etc.
- The Logic App is monitoring the Runbook job for completion. When the job is complete, the Logic App reports back to the Workflow, where the HR user sees the job is complete.
Here is my problem. The HR user only sees that the job is complete; they do not see if there were errors during execution. I have logging configured throughout the script and I want to send an email to the user who triggered the Workflow in step 1 above, but I cannot find a way to get that user’s UPN when they triggered the Workflow. How can I get the UPN of the person who is activating a EntraID Identity Governance Lifecycle Workflow?