Skip to content

Commit abd0903

Browse files
Update README.md
1 parent ca42e26 commit abd0903

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

NonInteractivePatGenerationSample/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Non-interactive PAT generation Sample
22

3-
This sample shows how to generate a Personal Access Token (PAT) using the [Client Libraries](https://www.visualstudio.com/en-us/docs/integrate/get-started/client-libraries/dotnet). You cannot use a PAT to generate a PAT and so this sample makes use of the Azure Active Directory Authentication Library (ADAL) to acquire an AAD token which is then used as a credential to authenticate requests to VSTS. This sample also uses the UserPasswordCredential rather than relying on the interactive pop-up dialog - this can be useful in scenarios where you need to generate a PAT associated with an account that does not have interactive login rights.
3+
This sample shows how to generate a Personal Access Token (PAT) using the [Client Libraries](https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries?view=vsts). You cannot use a PAT to generate a PAT and so this sample makes use of the Azure Active Directory Authentication Library (ADAL) to acquire an AAD token which is then used as a credential to authenticate requests to Azure DevOps. This sample also uses the UserPasswordCredential rather than relying on the interactive pop-up dialog - this can be useful in scenarios where you need to generate a PAT associated with an account that does not have interactive login rights.
44

55
## Sample Application
66

7-
This sample shows the basic flow for calling ADAL, and then using the resulting token as credentials to call the ```CreateSessionToken``` method on the ```DelegatedAuthorizationHttpClient``` class. In order to run this application you will need to [register your own AAD application](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications).
7+
This sample shows the basic flow for calling ADAL, and then using the resulting token as credentials to call the ```CreateSessionToken``` method on the ```DelegatedAuthorizationHttpClient``` class. In order to run this application you will need to [register your own AAD application](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-v1-integrate-apps-with-azure-ad).
88

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

@@ -18,5 +18,5 @@ git clone https://github.com/Microsoft/vsts-auth-samples.git
1818
1. Navigate to the sample in cloned repo `vsts-auth-samples/NonInteractivePatGenerationSample/`
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 `NonInteractivePatGenerationSample.sln` in [Visual Studio 2017](https://www.visualstudio.com/downloads/)
21-
4. Open CS file ```Program.cs``` and look at the first few lines in the ```Main``` method. Replace the username and password with the appropriate values. You will need to get the ```aadApplicationID``` value by [registering your app in AAD](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications).
22-
6. Build and run the solution, the generate PAT will be output to the console window.
21+
4. Open CS file ```Program.cs``` and look at the first few lines in the ```Main``` method. Replace the username and password with the appropriate values. You will need to get the ```aadApplicationID``` value by [registering your app in AAD](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-v1-integrate-apps-with-azure-ad).
22+
6. Build and run the solution, the generate PAT will be output to the console window.

0 commit comments

Comments
 (0)