Skip to content

Instantly share code, notes, and snippets.

@rajinders
rajinders / AzureAuthHeader
Created December 16, 2014 03:36
How to create authentication header for Azure. This code came from Azure Resource manager training by Kevin Lam and David Tesar. This willl be help to any who wants to use Azure REST API and needs to generate authentication header
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// you need to add project references to both Microsoft.IdentityModel.Clients.ActiveDirectory and
// Microsoft.IdentityModel.Clients.ActiveDirectory.WinForms
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using System.Threading;