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
# Quickstart: Sign in users and acquire an access token from a JavaScript single-page application
25
25
26
-
In this quickstart, you learn how to use a code sample that demonstrates 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.
27
-
28
-

26
+
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. A diagram of how the sample works is included under [More information](#more-information).
29
27
30
28
## Prerequisites
31
29
32
-
This quickstart requires the following setup:
33
-
* To run the project with a Node.js server, download and install [Node.js](https://nodejs.org/en/download/).
34
-
* To edit the project files, download and install [Visual Studio Code](https://code.visualstudio.com/download).
35
-
* To run the project as a Visual Studio solution, download and install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/).
30
+
* Azure subscription - [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F)
31
+
*[Node.js](https://nodejs.org/en/download/).
32
+
* Either [Visual Studio Code](https://code.visualstudio.com/download) (to edit project files), or [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) (ro run the project as a Visual Studio Solution).
36
33
37
34
> [!div renderon="docs"]
38
35
> ## Register and download your quickstart application
@@ -80,8 +77,6 @@ Select the option that's suitable to your development environment:
80
77
81
78
* (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*).
82
79
83
-
84
-
85
80
#### Step 3: Configure your JavaScript app
86
81
87
82
> [!div renderon="docs"]
@@ -142,6 +137,10 @@ After the browser loads the application, select **Sign In**. The first time that
142
137
143
138
## More information
144
139
140
+
### How the sample works
141
+
142
+

143
+
145
144
### msal.js
146
145
147
146
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:
0 commit comments