Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.98 KB

File metadata and controls

23 lines (16 loc) · 1.98 KB

Client Libraries Sample

For native applications the best way to authenticate and access Azure DevOps resources is using the Client Libraries. They are .NET libraries made to simplify integration with Azure DevOps and Team Foundation Server (2015 and later). They allow access to both the Traditional Client Object Model and new REST APIs.

Sample Application

This buildable sample will walk you through the steps to create an application which uses the Client Libraries to open an interactive login prompt and use that authentication state to execute a user pre-defined query written in Work Item Query Language. Query results are output into the console.

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: Run the sample

  1. Navigate to the sample in cloned repo vsts-auth-samples/ClientLibraryConsoleAppSample/
  2. Use Nuget package restore to ensure you have all dependencies installed
  3. Open the solution file ClientLibraryConsoleAppSample.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 the IDs all work items which match your query restrictions.