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
Copy file name to clipboardExpand all lines: articles/active-directory/develop/quickstart-v2-javascript.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ This quickstart requires the following setup:
36
36
37
37
> [!div renderon="docs"]
38
38
> ## Register and download your quickstart application
39
-
> To start your quickstart application, use either of the following options:
39
+
> To start your quickstart application, use either of the following options.
40
40
>
41
41
> ### Option 1 (Express): Register and auto configure your app and then download your code sample
42
42
>
@@ -76,8 +76,7 @@ This quickstart requires the following setup:
76
76
77
77
Select the option that's suitable to your development environment:
78
78
79
-
* To run the project with a web server by using Node.js, [download the core project files](https://github.com/Azure-Samples/active-directory-javascript-graphapi-v2/archive/quickstart.zip)
80
-
. To open the files, use an editor such as [Visual Studio Code](https://code.visualstudio.com/).
79
+
* To run the project with a web server by using Node.js, [download the core project files](https://github.com/Azure-Samples/active-directory-javascript-graphapi-v2/archive/quickstart.zip). To open the files, use an editor such as [Visual Studio Code](https://code.visualstudio.com/).
81
80
82
81
* (Optional) To run the project with the IIS server, [download the Visual Studio project](https://github.com/Azure-Samples/active-directory-javascript-graphapi-v2/archive/vsquickstart.zip). Extract the zip file to a local folder (for example, *C:\Azure-Samples*).
83
82
@@ -109,9 +108,9 @@ var msalConfig = {
109
108
> Where:
110
109
> -*\<Enter_the_Application_Id_here>* is the **Application (client) ID** for the application you registered.
111
110
> -*\<Enter_the_Tenant_info_here>* is set to one of the following options:
112
-
> - If your application supports *Accounts in this organizational directory*, replace this value with the **Tenant ID** or **Tenant name** (for example, *contoso.microsoft.com*).
113
-
> - If your application supports *Accounts in any organizational directory*, replace this value with **organizations**.
114
-
> - 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**.
111
+
> - If your application supports *accounts in this organizational directory*, replace this value with the **Tenant ID** or **Tenant name** (for example, *contoso.microsoft.com*).
112
+
> - If your application supports *accounts in any organizational directory*, replace this value with **organizations**.
113
+
> - 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**.
115
114
>
116
115
> > [!TIP]
117
116
> > 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.
@@ -138,7 +137,7 @@ After the browser loads the application, select **Sign In**. The first time that
138
137
139
138
## More information
140
139
141
-
### *msal.js*
140
+
### msal.js
142
141
143
142
The MSAL library signs in users and requests the tokens that are used to access an API that's protected by Microsoft identity platform. The quickstart *index.html* file contains a reference to the library:
144
143
@@ -176,7 +175,7 @@ var myMSALObj = new Msal.UserAgentApplication(msalConfig);
176
175
177
176
> |Where ||
178
177
> |---------|---------|
179
-
> |`ClientId`| The application ID of the application that's registered in the Azure portal|
178
+
> |`ClientId`| The application ID of the application that's registered in the Azure portal.|
180
179
> |`authority`| (Optional) The authority URL that supports account types, as described previously in the configuration section. The default authority is `https://login.microsoftonline.com/common`. |
181
180
> |`cacheLocation`| (Optional) Sets the browser storage for the auth state. The default is sessionStorage. |
182
181
> |`storeAuthStateInCookie`| (Optional) The library that stores the authentication request state that's required for validation of the authentication flows in the browser cookies. This cookie is set for IE and Edge browsers to mitigate certain [known issues](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/Known-issues-on-IE-and-Edge-Browser#issues). |
> |`scopes`| (Optional) Contains scopes that are being requested for user consent at sign-in time. For example, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom Web APIs (that is, `api://<Application ID>/access_as_user`). |
203
+
> |`scopes`| (Optional) Contains scopes that are being requested for user consent at sign-in time. For example, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom Web APIs (that is, `api://<Application ID>/access_as_user`). |
205
204
206
205
> [!TIP]
207
206
> Alternatively, you might want to use the `loginRedirect` method to redirect the current page to the sign-in page instead of a popup window.
208
207
209
208
### Request tokens
210
209
211
-
MSAL uses three methods to acquire tokens: `acquireTokenRedirect`, `acquireTokenPopup` and `acquireTokenSilent`
210
+
MSAL uses three methods to acquire tokens: `acquireTokenRedirect`, `acquireTokenPopup`, and `acquireTokenSilent`
212
211
213
212
#### Get a user token silently
214
213
@@ -240,7 +239,7 @@ There are situations where you need to force users to interact with the Microsof
240
239
241
240
The usual recommended pattern for most applications is to call `acquireTokenSilent` first, then catch the exception, and then call `acquireTokenPopup` (or `acquireTokenRedirect`) to start an interactive request.
242
241
243
-
Calling the `acquireTokenPopup` results in a popup window for signing in (or`acquireTokenRedirect` results in redirecting users to the Microsoft identity platform endpoint), where users need to interact by confirming their credentials, giving the consent to the required resource, or completing the two-factor authentication.
242
+
Calling the `acquireTokenPopup` results in a popup window for signing in. (Or`acquireTokenRedirect` results in redirecting users to the Microsoft identity platform endpoint.) In that window, users need to interact by confirming their credentials, giving the consent to the required resource, or completing the two-factor authentication.
0 commit comments