Skip to content

Commit 1378585

Browse files
Update README.md
1 parent 5b8afc9 commit 1378585

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

JavascriptWebAppSample/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Javascript Web App Sample
22

3-
For javascript web applications that want access to resources like VSTS REST API's, they will have to support an authentication flow for their users. The [Azure Active Directory Authentication Library (ADAL) for JS](https://github.com/AzureAD/azure-activedirectory-library-for-js) enables javascript application developers to setup inerative authentication flows and obtain access tokens for API usage.
3+
For javascript web applications that want access to resources like Azure DevOps REST API's, they will have to support an authentication flow for their users. The [Azure Active Directory Authentication Library (ADAL) for JS](https://github.com/AzureAD/azure-activedirectory-library-for-js) enables javascript application developers to setup inerative authentication flows and obtain access tokens for API usage.
44

55
## Sample Application
66

7-
This buildable sample will walk you through the steps to create a single page javascript application which uses ADAL to authenticate a user via an interactive prompt and display all projects contained in a VSTS account/TFS collection.
7+
This buildable sample will walk you through the steps to create a single page javascript application which uses ADAL to authenticate a user via an interactive prompt and display all projects contained in a Azure DevOps account/TFS collection.
88

99
To run this sample you will need:
1010
* Http-server. You can download [NPM http server](https://www.npmjs.com/package/http-server) if you need one.
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://docs.microsoft.com/en-us/azure/devops/organizations/accounts/manage-azure-active-directory-groups-vsts?view=vsts&tabs=new-nav)
1414

1515
## Step 1: Clone or download vsts-auth-samples repository
1616

@@ -27,7 +27,7 @@ git clone https://github.com/Microsoft/vsts-auth-samples.git
2727
4. Click on `App registrations` and select `New application registration` from the top bar.
2828
5. Enter a `name` for you application, ex. "Adal JS sample", choose `Web app/API` for `application type`, and enter `http://localhost:8081` for the `Sign-on URL`. Finally click `create` at the bottom of the screen.
2929
6. Save the `Application ID` from your new application registration. You will need it later in this sample.
30-
7. Grant permissions for VSTS. Click `Settings` -> `Required permissions` -> `add` -> `1 Select an API` -> type in and select `Microsoft Visual Studio Team Services (Microsoft.VisualStudio.Online)` -> check the box for `Delegated Permissions` -> click `Select` -> click `Done` -> click `Grant Permissions` -> click `Yes`.
30+
7. Grant permissions for Azure DevOps. Click `Settings` -> `Required permissions` -> `add` -> `1 Select an API` -> type in and select `Azure DevOps (Microsoft Visual Studio Team Services)` -> check the box for `Delegated Permissions` -> click `Select` -> click `Done` -> click `Grant Permissions` -> click `Yes`.
3131
8. Click on `Manifest` -> set the value for `oauth2AllowImplicitFlow` to `true` -> click `Save`.
3232

3333
## Step 3: Run the sample
@@ -37,10 +37,10 @@ git clone https://github.com/Microsoft/vsts-auth-samples.git
3737
* `clientId` - (Required) update this with the `application id` you saved from step 2.6 above
3838
* `replyUri` - (optional) In single page apps this should be the app URL itself. We have set this to `http://localhost:8081`(where we will host our app), but if you are hosting your app at another URL please change this value and the reply URI in `portal.azure.com`
3939
* `logoutredirectUri` - (optional) update if you are hosting your app at a location other than `http://localhost:8081`
40-
* `vstsApi` - (Required) update this with your VSTS/TFS collection, e.g. http://myaccount.visualstudio.com/DefaultCollection/_apis/projects?api-version=2.0 for VSTS or http://myserver:8080/tfs/DefaultCollection/_apis/projects?api-version=2.0 for TFS. If you would like to the sample to run a different VSTS API please change the entire string. [Learn more about other VSTS REST API's](https://www.visualstudio.com/en-us/docs/integrate/get-started/rest/basics)
41-
* `vstsResourceId` - Do not change this value. It is used to receive VSTS ADAL authentication tokens
40+
* `azDevApi` - (Required) update this with your Azure DevOps/TFS collection, e.g. http://myaccount.visualstudio.com/DefaultCollection/_apis/projects?api-version=2.0 for Azure DevOps or http://myserver:8080/tfs/DefaultCollection/_apis/projects?api-version=2.0 for TFS. If you would like to the sample to run a different Azure DevOps API please change the entire string. [Learn more about other Azure DevOps REST API's](https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1&viewFallbackFrom=vsts)
41+
* `azDevResourceId` - Do not change this value. It is used to receive Azure DevOps ADAL authentication tokens
4242
3. Navigate to the ADAL JS sample in cloned repo `vsts-auth-samples/JavascriptWebAppSample/` and start your http-server and set it to serve pages at `localhost:8081` which will by default serve `index.html` at `http://localhost:8081`.
43-
4. Navigate to `http://localhost:8081`. Sign in with a user account from your AAD tenant which has access to the VSTS account specified in the `vstsApi`. All projects contained in the account should be displayed.
43+
4. Navigate to `http://localhost:8081`. Sign in with a user account from your AAD tenant which has access to the VSTS account specified in the `azDevApi`. All projects contained in the account should be displayed.
4444

4545

4646

0 commit comments

Comments
 (0)