Skip to content

Commit 00f3763

Browse files
hamiltonhammacy
andauthored
Apply suggestions from code review
Co-Authored-By: Marsh Macy <[email protected]>
1 parent 0b02d75 commit 00f3763

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

articles/active-directory/develop/quickstart-v2-javascipt-auth-code.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Sign in users in JavaScript single-page apps with Auth Code | Azure
2+
title: Sign in users in JavaScript single-page apps with auth code | Azure
33
titleSuffix: Microsoft identity platform
44
description: Learn how a JavaScript app can call an API that requires access tokens using the Microsoft identity platform.
55
services: active-directory
@@ -25,7 +25,7 @@ ms.custom: aaddev, identityplatformtop40, scenarios:getting-started, languages:J
2525
> [!NOTE]
2626
> This quickstart uses MSAL.js 2.0 with the Authorization Code flow. To use MSAL.js 1.0 with the implicit flow, view [this quickstart](https://docs.microsoft.com/azure/active-directory/develop/quickstart-v2-javascript)
2727
28-
In this quickstart, you use a code sample to learn how a JavaScript single-page application (SPA) can sign in users of personal accounts, work accounts, and school accounts. A JavaScript SPA can also get an access token to call the Microsoft Graph API or any web API. (See [How the sample works](#how-the-sample-works) for an illustration.)
28+
In this quickstart, you use a code sample to learn how a JavaScript single-page application (SPA) can sign in users of personal accounts, work accounts, and school accounts. A JavaScript SPA can also get an access token to call the Microsoft Graph API or any web API. See [How the sample works](#how-the-sample-works) for an illustration.
2929

3030
## Prerequisites
3131

@@ -40,9 +40,9 @@ In this quickstart, you use a code sample to learn how a JavaScript single-page
4040
>
4141
> ### Option 1 (Express): Register and auto configure your app and then download your code sample
4242
>
43-
> 1. Sign in to the [Azure portal](https://portal.azure.com) by using either a work or school account, or a personal Microsoft account.
43+
> 1. Sign in to the [Azure portal](https://portal.azure.com).
4444
> 1. If your account gives you access to more than one tenant, select the account at the top right, and then set your portal session to the Azure Active Directory (Azure AD) tenant you want to use.
45-
> 1. Go to the new [Azure portal - App registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade/quickStartType/JavascriptSpaQuickstartPage/sourceType/docs) pane.
45+
> 1. Select [App registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade/quickStartType/JavascriptSpaQuickstartPage/sourceType/docs).
4646
> 1. Enter a name for your application.
4747
> 1. Under **Supported account types**, select **Accounts in any organizational directory and personal Microsoft accounts**.
4848
> 1. Select **Register**.
@@ -52,10 +52,10 @@ In this quickstart, you use a code sample to learn how a JavaScript single-page
5252
>
5353
> #### Step 1: Register your application
5454
>
55-
> 1. Sign in to the [Azure portal](https://portal.azure.com) by using either a work or school account, or a personal Microsoft account.
55+
> 1. Sign in to the [Azure portal](https://portal.azure.com).
5656
>
5757
> 1. If your account gives you access to more than one tenant, select your account at the top right, and then set your portal session to the Azure AD tenant you want to use.
58-
> 1. Go to the Microsoft identity platform for developers [App registrations](https://go.microsoft.com/fwlink/?linkid=2083908) page.
58+
> 1. Select [App registrations](https://go.microsoft.com/fwlink/?linkid=2083908).
5959
> 1. Select **New registration**.
6060
> 1. When the **Register an application** page appears, enter a name for your application.
6161
> 1. Under **Supported account types**, select **Accounts in any organizational directory and personal Microsoft accounts**.
@@ -79,10 +79,10 @@ In this quickstart, you use a code sample to learn how a JavaScript single-page
7979
> [!div renderon="docs"]
8080
> To run the project with a web server by using Node.js, [download the core project files](https://github.com/Azure-Samples/ms-identity-javascript-v2/archive/quickstart.zip).
8181
82-
> [!div renderon="portal"]
82+
> [!div renderon="portal" class="sxs-lookup"]
8383
> Run the project with a web server by using Node.js
8484
85-
> [!div renderon="portal" id="autoupdate" class="nextstepaction"]
85+
> [!div renderon="portal" id="autoupdate" class="nextstepaction" class="sxs-lookup"]
8686
> [Download the code sample](https://github.com/Azure-Samples/ms-identity-javascript-v2/archive/quickstart.zip)
8787
8888
> [!div renderon="docs"]
@@ -107,7 +107,7 @@ In this quickstart, you use a code sample to learn how a JavaScript single-page
107107
>
108108
>```
109109
110-
> [!div renderon="portal"]
110+
> [!div renderon="portal" class="sxs-lookup"]
111111
> > [!NOTE]
112112
> > `Enter_the_Supported_Account_Info_Here`
113113
@@ -122,7 +122,7 @@ In this quickstart, you use a code sample to learn how a JavaScript single-page
122122
> - If your application supports *accounts in any organizational directory and personal Microsoft accounts*, replace this value with **common**. To restrict support to *personal Microsoft accounts only*, replace this value with **consumers**.
123123
> - *\<Enter_the_Redirect_Uri_Here>* is `http://localhost:3000`
124124
> > [!TIP]
125-
> > To find the values of **Application (client) ID**, **Directory (tenant) ID**, and **Supported account types**, go to the app's **Overview** page in the Azure portal.
125+
> > To find the values of **Application (client) ID**, **Directory (tenant) ID**, and **Supported account types**, go to the app registration's **Overview** page in the Azure portal.
126126
>
127127
> [!div class="sxs-lookup" renderon="portal"]
128128
> #### Step 3: Your app is configured and ready to run
@@ -148,22 +148,22 @@ In this quickstart, you use a code sample to learn how a JavaScript single-page
148148
> [!div renderon="docs"]
149149
>
150150
> Where:
151-
> - *\<Enter_the_Graph_Endpoint_Here>* is the endpoint that API calls will be made against. For the main or global Microsoft Graph API service, simply enter `https://graph.microsoft.com`. For more information, see [National cloud deployment](https://docs.microsoft.com/graph/deployments)
151+
> - *\<Enter_the_Graph_Endpoint_Here>* is the endpoint that API calls will be made against. For the main or global Microsoft Graph API service, enter `https://graph.microsoft.com`. For more information, see [National cloud deployment](https://docs.microsoft.com/graph/deployments).
152152
>
153153
> #### Step 4: Run the project
154154
155155
Run the project with a web server by using [Node.js](https://nodejs.org/en/download/):
156156
157-
1. To start the server, run the following command from the project directory:
158-
```batch
157+
1. To start the server, run the following commands from within the project directory:
158+
```bash
159159
npm install
160160
npm start
161161
```
162-
1. Open a web browser and go to `http://localhost:3000/`.
162+
1. Browse to `http://localhost:3000/`.
163163
164164
1. Select **Sign In** to start the sign-in, and then call Microsoft Graph API.
165165
166-
After the browser loads the application, select **Sign In**. The first time that you sign in, you're prompted to provide your consent to allow the application to access your profile and to sign you in. After you're signed in successfully, your user profile information should be displayed on the page.
166+
After the browser loads the application, select **Sign In**. The first time you sign in, you're prompted to provide your consent to allow the application to access your profile and sign you in. After you're signed in successfully, your user profile information should be displayed on the page.
167167
168168
## More information
169169
@@ -181,20 +181,17 @@ The MSAL library signs in users and requests the tokens that are used to access
181181
> [!TIP]
182182
> You can replace the preceding version with the latest released version under [MSAL.js releases](https://github.com/AzureAD/microsoft-authentication-library-for-js/releases).
183183
184-
Alternatively, if you have Node.js installed, you can download the latest version through Node.js Package Manager (npm):
184+
Alternatively, if you have Node.js installed, you can download the latest version by using the Node.js Package Manager (npm):
185185
186186
```batch
187187
npm install msal
188188
```
189189
190190
## Next steps
191191
192+
The [MSAL.js GitHub repo](https://github.com/AzureAD/microsoft-authentication-library-for-js) contains additional library documentation, a FAQ, and provides issue support.
193+
192194
For a more detailed step-by-step guide on building the application for this quickstart, see:
193195
194196
> [!div class="nextstepaction"]
195197
> [Tutorial to sign in and call MS Graph](https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-javascript-auth-code)
196-
197-
To browse the MSAL repo for documentation, FAQ, issues, and more, see:
198-
199-
> [!div class="nextstepaction"]
200-
> [MSAL.js GitHub repo](https://github.com/AzureAD/microsoft-authentication-library-for-js)

0 commit comments

Comments
 (0)