Skip to content

Commit da9626d

Browse files
committed
adding new sample readmes
1 parent 7d69b57 commit da9626d

File tree

11 files changed

+49
-9
lines changed

11 files changed

+49
-9
lines changed

Client_OM_Sample/ClientOmConsoleApp/ClientOmConsoleApp.sln renamed to Client_Libraries_Sample/ClientLibrariesConsoleApp/ClientLibrariesConsoleApp.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.26228.9
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientOmConsoleApp", "ConsoleApp1\ClientOmConsoleApp.csproj", "{F7AC99CF-0972-4727-AC95-F537EF4EB4EA}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientLibrariesConsoleApp", "ClientLibrariesConsoleApp.csproj", "{F7AC99CF-0972-4727-AC95-F537EF4EB4EA}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Client_OM_Sample/ClientOmConsoleApp/ClientOmConsoleApp/Program.cs renamed to Client_Libraries_Sample/ClientLibrariesConsoleApp/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
using Microsoft.VisualStudio.Services.Common;
1010
using Microsoft.VisualStudio.Services.WebApi;
1111

12-
namespace ClienOmConsoleApp
12+
namespace ClienLibrariesConsoleApp
1313
{
14-
class ClientOmConsoleApp
14+
class ClientLibrariesConsoleApp
1515
{
1616
//Console application to execute a user defined work item query
1717
static void Main(string[] args)

Client_Libraries_Sample/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Client Libraries Sample
2+
3+
The [Client Libraries](https://www.visualstudio.com/en-us/docs/integrate/get-started/client-libraries/dotnet) are .NET libraries made to simplify integration with Visual Studio Team Services and Team Foundation Server (2015 and later). They allow access to both the Traditional Client Object Model and [new REST APIs](https://www.visualstudio.com/en-us/docs/integrate/api/overview).
4+
5+
## Sample Application
6+
7+
This buildable sample will walk you through the steps to create an application which uses the [Client Libraries](https://www.visualstudio.com/en-us/docs/integrate/get-started/client-libraries/dotnet) to open an interactive login prompt and use that authentication state to execute a user pre-defined query written in [Work Item Query Language](https://msdn.microsoft.com/en-us/library/bb130198(v=vs.90).aspx). Query results are output into the console.
8+
9+
## Step 1: Clone or download vsts-auth-samples repository
10+
11+
From a shell or command line:
12+
```no-highlight
13+
git clone https://github.com/Microsoft/vsts-auth-samples.git
14+
```
15+
16+
## Step 2: Run the sample
17+
18+
1. Navigate to the sample in cloned repo `vsts-auth-samples/Client_Libraries_Sample/ClientLibrariesConsoleApp/`
19+
2. Use [Nuget package restore](https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore) to ensure you have all dependencies installed
20+
3. Open the solution file `ClientLibrariesConsoleApp.sln` in [Visual Studio IDE 2017](https://www.visualstudio.com/downloads/)
21+
4. Open CS file `Program.cs` and there will be 2 input fields:
22+
* `collectionUri` - Mutable value. This is the url to your VSTS/TFS account.
23+
* `query` - Mutable value. This is the WIQL query you want to execute. Replace this with any query you want to execute.
24+
5. Build and run solution. After running you should see a list of the IDs all work items which match your query restrictions.

Client_OM_Sample/ClientOmConsoleApp/README.md

Whitespace-only changes.

Device_Profile_Sample/Device_Profile_Get_Identity_Data/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,20 @@ This buildable sample will walk you through the steps to create a client-side co
1010

1111
From a shell or command line:
1212
```no-highlight
13-
git clone https://github.com/Microsoft/vsts-auth-samples.git
13+
git clone https://github.com/Microsoft/vsts-auth-samples.git
14+
```
15+
16+
## Step 2: Install and configure ADAL (optional)
17+
18+
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](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory).
19+
20+
## Step 3: Run the sample
21+
22+
1. Navigate to the sample in cloned repo `vsts-auth-samples/Device_Profile_Sample/Device_Profile_Get_Identity_Data/`
23+
2. Use [Nuget package restore](https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore) to ensure you have all dependencies installed
24+
3. Open the solution file `Device Profile - Get Identity Data.sln` in [Visual Studio IDE 2017](https://www.visualstudio.com/downloads/)
25+
4. Open CS file `Program.cs` and there are 2 important fields to be aware of:
26+
* `VSTSResourceId` - Immutable value. Denotes that we need a VSTS access token.
27+
* `clientId` - Immutable value*. *Normally your app's registered AAD clientId, but for VSTS is must be the VS client ID provided
28+
These fields are how we configure ADAL to aquire a VSTS access token for the authenticated user.
29+
5. Build and run solution. You should see a console window waiting for text input. Input `userdata` to start the Device Profile auth flow. After authenticating you should see VSTS identity information displayed in the console window.

Managed_Client_ADAL_Sample/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ Package: `Microsoft.Identity.Model.Clients.ActiveDirectory` has already been ins
1919

2020
## Step 3: Run the sample
2121

22-
1. Navigate to the ADAL C# sample in cloned repo `vsts-auth-samples/Managed_Client_Sample_(ADAL_C#)/`
22+
1. Navigate to the ADAL C# sample in cloned repo `vsts-auth-samples/Managed_Client_ADAL_Sample/`
2323
2. Use [Nuget package restore](https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore) to ensure you have all dependencies installed
24-
2. Open the solution file `SimpleAdalConsoleApp.sln` in [Visual Studio IDE](https://www.visualstudio.com/downloads/)
25-
3. Open CS file `Program.cs` and there will be 3 input fields:
24+
3. Open the solution file `SimpleAdalConsoleApp.sln` in [Visual Studio IDE 2017](https://www.visualstudio.com/downloads/)
25+
4. Open CS file `Program.cs` and there will be 3 input fields:
2626
* `VSTSResourceId` - Immutable value. Denotes that we need a VSTS access token.
2727
* `clientId` - Immutable value*. *Normally your app's registered AAD clientId, but for VSTS is must be the VS client ID provided
2828
* `VSTSAccountName` - Mutable value. Update with the name of the VSTS account you would like to access. (e.g. "myaccount" from myaccount.visualstuido.com)
29-
4. Build and run solution. After running you should see a list of all projects inside of myaccount.
29+
5. Build and run solution. After running you should see a list of all projects inside of myaccount.
3030

3131

3232

0 commit comments

Comments
 (0)