Automating Domain Unjoin When Deleting VMSS Instance
Hello,
I am trying to create an automation that unjoins a domain when an alert triggers for VM deletion. I have set up a single VMSS, an alert, two action groups (for email and automation), and an Azure automation account runbook.
When attempting to destroy an instance in VMSS, I receive emails from the email action group, but there is no indication of an automation action group. Trying the "Test" button in the Automation action group results in an "HTTP 401: The Automation Runbook returned a 'Unauthorized' error." message. I'm not sure which permissions I need to set up and where. I have tried various permissions, but none of them seemed to work.
Thank you, Santosh Patil