Azure Resource Manager REST calls from Python

MSFT Stack

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:

Initial Setup

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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s