You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Device_Profile_Sample/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ For a headless text output client application, it is not possible authenticate t
4
4
5
5
## Sample Application
6
6
7
-
This buildable sample will walk you through the steps to create a client-side console application which uses ADAL to authenticate a user via the [Device Profile flow](https://azure.microsoft.com/en-us/resources/samples/active-directory-dotnet-deviceprofile/?v=17.23h) and returns a JSON string containing all VSTS identity data for the authenticated user.
7
+
This buildable sample will walk you through the steps to create a client-side console application which uses ADAL to authenticate a user via the [Device Profile flow](https://azure.microsoft.com/en-us/resources/samples/active-directory-dotnet-deviceprofile/?v=17.23h) and returns a JSON string containing all account team project data viewable by the authenticated user.
8
8
9
9
## Step 1: Clone or download vsts-auth-samples repository
10
10
@@ -19,11 +19,12 @@ Package: `Microsoft.Identity.Model.Clients.ActiveDirectory` has already been ins
19
19
20
20
## Step 3: Run the sample
21
21
22
-
1. Navigate to the sample in cloned repo `vsts-auth-samples/Device_Profile_Sample/Device_Profile_Get_Identity_Data/`
22
+
1. Navigate to the sample in cloned repo `vsts-auth-samples/Device_Profile_Sample/`
23
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/)
24
+
3. Open the solution file `Device Profile Sample.sln` in [Visual Studio IDE 2017](https://www.visualstudio.com/downloads/)
25
25
4. Open CS file `Program.cs` and there are 2 important fields to be aware of:
26
26
*`VSTSResourceId` - Immutable value. Denotes that we need a VSTS access token.
27
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.
28
+
*`vstsAccountUri` - Mutable value. Denotes your vsts account URL (i.e. https://myaccount.visualstudio.com). Please update this with your account URL
29
+
*`restEndpoint` - Mutable value. Denotes which REST API endpoint we want to hit. We have configured it to return team project information.
30
+
5. Build and run solution. You should see a console window with instruction on how to authenticate via the Device Profile flow. After authenticating you should see all team project information viewable by the authenticated identity displayed in the console window.
0 commit comments