AzureRecipes

Introduction

For almost every resource type as well as for the central Azure Resource Manager there is a comprehensive REST API provided, which is also well documented. However, the documentation and most of other internet resources just demonstrate how to authenticate a service principal for application access. This requires you to assign according permissions to resources (RBAC), which is not always wanted or even possible. For API calls with Postman you maybe want a delegated access based on your personal account.

Manual

App Registration

To get an authentication token for your account, you need to have an App Registration in the Azure Active Directory. This information shows up when you ask for an authentication the first time (grant access to application dialog).

You basically just have to define and specify:

Postman

Chose any API Method for testing, e.g. List Management Resources for the authenticated user. Copy this URL into Postman and set the HTTP method accordingly.

Create and define following variables with values you gathered just before:

In the Authorization Tab apply the following settings:

You can now send the API request and whenever you encounter authentication errors, just execute Get New Access Token which opens a browser and lets you login. After successfull authentication the (refreshed) authentication token is automatically added to the request header.