Authenticating to the Azure Resource Manager API

If you want to be able to query the Azure Resource Manager API (management.azure.com) using a tool like Postman you will first need to acquire a Bearer token or JSON web token (JWT).

Acquire the Bearer Token

To do this the following PowerShell script can be run, making sure to update $adTenant with your Azure Active Directory Tenant.

The script can also be downloaded from here.

This will create a file jwt.txt with the Bearer Token.

Connecting to the ARM API using Postman

  1. Download Postman from https://www.getpostman.com/
  2. Manage Environments

  3. Enter in the fields ‘subscriptionid’ and then the Subscription ID guid

  4. Configure Global Variable for the bearer token

    This is the bearer token that is obtained from the PowerShell script

  5. Configure Headers
    1. Content-Type     application/json
    2. Authorization    {{bearer}}

  6. Define the API request using {{subscriptionid}} which will be substituted in from the environment variable