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
//============= Config [Edit these with your settings] =====================
13
-
internalconststringvstsOrTfsCollectionUrl="VSTS: https://*.visualstudio.com or TFS: https://*:8080/tfs/defaultcollection";//change to the URL of your VSTS or TFS account
13
+
internalconststringvstsOrTfsCollectionUrl="https://myaccount.visualstudio.com"//change to the URL of your VSTS or TFS account; VSTS: https://*.visualstudio.com TFS: https://*:8080/tfs/defaultcollection"
2. On the top bar, click on your account and under the Directory list, choose the Active Directory tenant where you wish to register your application.
26
26
3. On the left hand navigation menu, select `Azure Active Directory`.
27
27
4. Click on `App registrations` and select `New application registration` from the top bar.
28
-
5. Enter a `name` for you application, ex. "Adal JS sample", choose `Web app/API` for `application type`, and enter `http://localhost:8080` for the `Redirect URI`. Finally click `create` at the bottom of the screen.
28
+
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 `Redirect URI`. Finally click `create` at the bottom of the screen.
29
29
6. Save the `Application ID` from your new application registration. You will need it later in this sample.
30
30
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`.
1. Open `index.html` in [Visual Studio Code](https://code.visualstudio.com/download) or another text editor or IDE.
35
35
2. Inside `index.html` there is a section called `Input Vars` you will need to update to run the sample:
36
36
*`clientId` - (Required) update this with the `application id` you saved from step 2.6 above
37
-
*`replyUri` - (optional) In single page apps this should be the app URL itself. We have set this to `http://localhost:8080`(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`
38
-
*`logoutredirectUri` - (optional) update if you are hosting your app at a location other than `http://localhost:8080`
37
+
*`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`
38
+
*`logoutredirectUri` - (optional) update if you are hosting your app at a location other than `http://localhost:8081`
39
39
*`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)
40
40
*`vstsResourceId` - Do not change this value. It is used to receive VSTS ADAL authentication tokens
41
-
3. Navigate to the ADAL JS sample in cloned repo `vsts-auth-samples/JavascriptWebAppSample/` and start your http-server which will by default serve `index.html` at `http://localhost:8080`.
42
-
4. Navigate to `http://localhost:8080`. 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.
41
+
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`.
42
+
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.
0 commit comments