Skip to content

Commit 2ef123c

Browse files
author
Justin Marks
committed
merge from master
2 parents 1fae389 + 2de3d9b commit 2ef123c

File tree

26 files changed

+352
-388
lines changed

26 files changed

+352
-388
lines changed

ClientLibraryConsoleAppSample/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ namespace ClientLibraryConsoleAppSample
1111
class Program
1212
{
1313
//============= Config [Edit these with your settings] =====================
14-
internal const string vstsCollectionUrl = "https://myaccount.visualstudio.com"; //change to the URL of your VSTS account; NOTE: This must use HTTPS
14+
internal const string azureDevOpsOrganizationUrl = "https://dev.azure.com/organization"; //change to the URL of your Azure DevOps account; NOTE: This must use HTTPS
1515
// internal const string vstsCollectioUrl = "http://myserver:8080/tfs/DefaultCollection" alternate URL for a TFS collection
1616
//==========================================================================
1717

1818
//Console application to execute a user defined work item query
1919
static void Main(string[] args)
2020
{
2121
//Prompt user for credential
22-
VssConnection connection = new VssConnection(new Uri(vstsCollectionUrl), new VssClientCredentials());
22+
VssConnection connection = new VssConnection(new Uri(azureDevOpsOrganizationUrl), new VssClientCredentials());
2323

2424
//create http client and query for resutls
2525
WorkItemTrackingHttpClient witClient = connection.GetClient<WorkItemTrackingHttpClient>();

ClientLibraryConsoleAppSample/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Client Libraries Sample
22

3-
For native applications the best way to authenticate and access VSTS resources is using the [Client Libraries](https://www.visualstudio.com/en-us/docs/integrate/get-started/client-libraries/dotnet). They 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).
3+
For native applications the best way to authenticate and access Azure DevOps resources is using the [Client Libraries](https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries?view=vsts). 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](https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1).
44

55
## Sample Application
66

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.
7+
This buildable sample will walk you through the steps to create an application which uses the [Client Libraries](https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries?view=vsts) 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.
88

99
## Step 1: Clone or download vsts-auth-samples repository
1010

@@ -19,5 +19,5 @@ git clone https://github.com/Microsoft/vsts-auth-samples.git
1919
2. Use [Nuget package restore](https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore) to ensure you have all dependencies installed
2020
3. Open the solution file `ClientLibraryConsoleAppSample.csproj` in [Visual Studio 2017](https://www.visualstudio.com/downloads/)
2121
4. Open CS file `Program.cs` and there is a section with input values to change at the top of the class:
22-
* `vstsCollectionUrl` - Mutable value. This is the url to your VSTS/TFS collection, e.g. http://myaccount.visualstudio.com for VSTS or http://myserver:8080/tfs/DefaultCollection for TFS.
23-
5. Build and run solution. After running you should see a list of the IDs all work items which match your query restrictions.
22+
* `azureDevOpsOrganizationUrl` - Mutable value. This is the url to your Azure DevOps/TFS collection, e.g. http://dev.azure.com/organization for Azure DevOps or http://myserver:8080/tfs/DefaultCollection for TFS.
23+
5. Build and run solution. After running you should see a list of the IDs all work items which match your query restrictions.

ClientLibraryPatAppSample/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Client Libraries Sample
22

3-
For native applications the best way to authenticate and access VSTS resources is using the [Client Libraries](https://www.visualstudio.com/en-us/docs/integrate/get-started/client-libraries/dotnet). They 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).
3+
For native applications the best way to authenticate and access Azure DevOps resources is using the [Client Libraries](https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries?view=vsts). 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](https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1).
44

55
## Sample Application
66

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) and a personal access token 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.
7+
This buildable sample will walk you through the steps to create an application which uses the [Client Libraries](https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries?view=vsts) and a personal access token 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.
88

99
## Step 1: Clone or download vsts-auth-samples repository
1010

@@ -15,11 +15,11 @@ git clone https://github.com/Microsoft/vsts-auth-samples.git
1515

1616
## Step 2: Run the sample
1717

18-
1. Generate a [PAT token](https://docs.microsoft.com/en-us/vsts/organizations/accounts/use-personal-access-tokens-to-authenticate?view=vsts) and grant it "Work items (read)" permission and make a copy of the generated value
18+
1. Generate a [PAT token](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=vsts) and grant it "Work items (read)" permission and make a copy of the generated value
1919
2. Navigate to the sample in cloned repo `vsts-auth-samples/ClientLibraryPatAppSample/`
2020
3. Use [Nuget package restore](https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore) to ensure you have all dependencies installed
2121
4. Open the solution file `ClientLibraryPatAppSample.csproj` in [Visual Studio 2017](https://www.visualstudio.com/downloads/)
2222
5. Open CS file `Program.cs` and there is a section with input values to change at the top of the class:
23-
* `vstsCollectionUrl` - Mutable value. This is the url to your VSTS/TFS collection, e.g. http://myaccount.visualstudio.com for VSTS or http://myserver:8080/tfs/DefaultCollection for TFS.
23+
* `azureDevOpsOrganizationUrl` - Mutable value. This is the url to your Azure DevOps/TFS organization/collection, e.g. http://dev.azure.com/organization for Azure DevOps or http://myserver:8080/tfs/DefaultCollection for TFS.
2424
* `pat` - Mutable value. This is the value you generated in step 1.
2525
6. Build and run solution. After running you should see a list of the IDs all work items which match your query restrictions.

DeviceProfileSample/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ For a headless text output client application, it is not possible authenticate t
66

77
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.
88

9-
To run this sample for an [Azure Active Directory](https://docs.microsoft.com/en-us/azure/active-directory/active-directory-whatis) backed VSTS account you will need:
9+
To run this sample for an [Azure Active Directory](https://docs.microsoft.com/en-us/azure/active-directory/active-directory-whatis) backed Azure DevOps account you will need:
1010
* [Visual Studio IDE](https://www.visualstudio.com/vs/)
1111
* An Azure Active Directory (AAD) tenant. If you do not have one, follow these [steps to set up an AAD](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-howto-tenant)
1212
* A user account in your AAD tenant
13-
* A VSTS account backed by your AAD tenant where your user account has access. If you have an existing VSTS account not connected to your AAD tenant follow these [steps to connect your AAD tenant to your VSTS account](https://www.visualstudio.com/en-us/docs/setup-admin/team-services/manage-organization-access-for-your-account-vs)
13+
* A Azure DevOps account backed by your AAD tenant where your user account has access. If you have an existing Azure DevOps account not connected to your AAD tenant follow these [steps to connect your AAD tenant to your Azure DevOps account](https://www.visualstudio.com/en-us/docs/setup-admin/team-services/manage-organization-access-for-your-account-vs)
1414

15-
To run this sample for a [Microsoft Account](https://account.microsoft.com/account) backed VSTS account you will need:
15+
To run this sample for a [Microsoft Account](https://account.microsoft.com/account) backed Azure DevOps account you will need:
1616
* [Visual Studio IDE](https://www.visualstudio.com/vs/)
17-
* A VSTS account not connected to AAD
17+
* A Azure DevOps account not connected to AAD
1818

1919
## Step 1: Clone or download vsts-auth-samples repository
2020

@@ -23,10 +23,10 @@ From a shell or command line:
2323
git clone https://github.com/Microsoft/vsts-auth-samples.git
2424
```
2525

26-
## Step 2: Register the sample application with you Azure Active Directory tenant (AAD backed VSTS account)
26+
## Step 2: Register the sample application with you Azure Active Directory tenant (AAD backed Azure DevOps account)
2727

2828
```no-highlight
29-
If you are a Microsoft Account backed VSTS account please skip this step.
29+
If you are a Microsoft Account backed Azure DevOps account please skip this step.
3030
```
3131

3232
1. Sign in to the [Azure Portal](https://portal.azure.com).
@@ -35,27 +35,27 @@ If you are a Microsoft Account backed VSTS account please skip this step.
3535
4. Click on `App registrations` and select `New application registration` from the top bar.
3636
5. Enter a `name` for you application, ex. "Adal native app sample", choose `Native` for `application type`, and enter `http://adalsample` for the `Redirect URI`. Finally click `create` at the bottom of the screen.
3737
6. Save the `Application ID` from your new application registration. You will need it later in this sample.
38-
7. Grant permissions for VSTS. Click `Required permissions` -> `add` -> `1 Select an API` -> type in and select `Microsoft Visual Studio Team Services` -> check the box for `Delegated Permissions` -> click `Select` -> click `Done` -> click `Grant Permissions` -> click `Yes`.
38+
7. Grant permissions for Azure DevOps. Click `Required permissions` -> `add` -> `1 Select an API` -> type in and select `Azure DevOps` -> check the box for `Delegated Permissions` -> click `Select` -> click `Done` -> click `Grant Permissions` -> click `Yes`.
3939

4040
## Step 3: Install and configure ADAL (optional)
4141

4242
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).
4343

44-
## Step 4a: Run the sample (AAD backed VSTS account)
44+
## Step 4a: Run the sample (AAD backed Azure DevOps account)
4545

4646
1. Navigate to the sample in cloned repo `vsts-auth-samples/DeviceProfileSample/`
4747
2. Open the solution file `DeviceProfileSample.sln` in [Visual Studio 2017](https://www.visualstudio.com/downloads/)
4848
3. Use [Nuget package restore](https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore) to ensure you have all dependencies installed
4949
4. Open CS file `Program.cs` and there is a section with input values to change at the top of the class:
50-
* `vstsCollectionUrl` - Update this value to your VSTS collection URL, e.g. http://myaccount.visualstudio.com.
50+
* `azureDevOpsOrganizationUrl` - Update this value to your VSTS collection URL, e.g. http://dev.azure.com/organization.
5151
* `clientId` - Update this value with the `Application ID` you saved in step 2.6.
5252
5. Build and run solution. You should see a console window with instructions 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.
5353

54-
## Step 4b: Run the sample (Microsoft Account backed VSTS account)
54+
## Step 4b: Run the sample (Microsoft Account backed Azure DevOps account)
5555

5656
1. Navigate to the sample in cloned repo `vsts-auth-samples/DeviceProfileSample/`
5757
2. Open the solution file `DeviceProfileSample.sln` in [Visual Studio 2017](https://www.visualstudio.com/downloads/)
5858
3. Use [Nuget package restore](https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore) to ensure you have all dependencies installed
5959
4. Open CS file `Program.cs` and there is a section with input values to change at the top of the class:
60-
* `vstsCollectionUrl` - Update this value to your VSTS collection URL, e.g. http://myaccount.visualstudio.com.
61-
5. Build and run solution. You should see a console window with instructions 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.
60+
* `azureDevOpsOrganizationUrl` - Update this value to your VSTS collection URL, e.g. http://dev.azure.com/organization.
61+
5. Build and run solution. You should see a console window with instructions 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

Comments
 (0)