This article describes how to make REST calls to Azure Resource Manager (ARM) from Python. In particular, how to authenticate. Once you have an authentication token you just add it to your REST call headers when calling the Azure REST API.
Note: If you’re looking for the official Azure SDK for Python, go here: https://github.com/Azure/azure-sdk-for-python.
Creating an Azure Resource Manager app requires some one-time setup steps:
- Create an Azure Active Directory App
- Create a Service Principal (an Active Directory “user” which represents an automated application) and grant it permissions
- Create a credential object and get the tenant ID.
These steps are well documented here: Authenticating a Service Principal with Azure Resource Manager, and are covered (using PowerShell) in steps 1-4 of my C# Azure REST write-up here: How to call the Azure Resource Manager REST API from C#.
If you follow these steps you will have the…
View original post 185 more words