Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 1.84 KB

File metadata and controls

31 lines (18 loc) · 1.84 KB

Managed Client ADAL Sample

The Azure Active Directory Authentication Library (ADAL) enables client application developers to authenticate cloud users and obtain access tokens for API usage.

Sample Application

This buildable sample will walk you through the steps to create a client-side console application which uses ADAL to authenticate a user via an interactive prompt and return a list of all projects inside a selected VSTS account.

Step 1: Clone or download vsts-auth-samples repository

From a shell or command line:

git clone https://github.com/Microsoft/vsts-auth-samples.git

Step 2: Install and configure ADAL (optional)

Package: Microsoft.Identity.Model.Clients.ActiveDirectory has already been installed and configured in the sample, but if you are adding to your own project you will need to install and configure it yourself.

Step 3: Run the sample

  1. Navigate to the ADAL C# sample in cloned repo vsts-auth-samples/ManagedClientConsoleAppSample/
  2. Use Nuget package restore to ensure you have all dependencies installed
  3. Open the solution file ManagedClientConsoleAppSample.csproj in Visual Studio 2017
  4. Open CS file Program.cs and there is a section with input values to change at the top of the class:
  5. Build and run solution. After running you should see a list of all projects inside of myaccount.