Using Azure Automation
Azure Automation is a service in Azure that is designed to help users to create, manage, deploy, and maintain their Azure resources. Azure Automation contains several concepts that remove some of the complexities and low-level details from these actions. Azure Automation allows for the formulation of workflows in the form of runbooks. These runbooks can be executed against Azure resources on behalf of the user.
Automation account resources
Within an Azure Automation account, there are several resources that make this more than just a scripting engine. These resources are shared on the level of the Automation account and can hence be reused within multiple runbooks.
Run As account
The first of these constructs is the Run As account. This account is a service principal that will be created in the AAD that the Azure subscription containing the Automation account is linked to. The credentials to authenticate as this service principal are securely stored...