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
+38-33Lines changed: 38 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,10 @@ In this quickstart, you use a code sample to learn how a JavaScript single-page
25
25
## Prerequisites
26
26
27
27
* Azure subscription - [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F)
28
-
*[Node.js](https://nodejs.org/en/download/).
28
+
*[Node.js](https://nodejs.org/en/download/)
29
29
*[Visual Studio Code](https://code.visualstudio.com/download) (to edit project files)
30
30
31
+
31
32
> [!div renderon="docs"]
32
33
> ## Register and download your quickstart application
33
34
> To start your quickstart application, use either of the following options.
@@ -70,38 +71,39 @@ In this quickstart, you use a code sample to learn how a JavaScript single-page
70
71
71
72
#### Step 2: Download the project
72
73
73
-
Select the option that's suitable to your development environment:
74
+
> [!div renderon="docs"]
75
+
> 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).
74
76
75
-
* 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/).
77
+
> [!div renderon="portal"]
78
+
> Run the project with a web server by using Node.js
cacheLocation:"sessionStorage", // This configures where your cache will be stored
96
-
storeAuthStateInCookie:false, // Set this to "true" if you are having issues on IE11 or Edge
97
-
forceRefresh:false// Set this to "true" to skip a cached token and go to the server to get a new
98
-
}
99
-
};
100
-
101
-
```
102
104
> [!div renderon="portal"]
103
105
> > [!NOTE]
104
-
> > This quickstart supports Enter_the_Supported_Account_Info_Here.
106
+
> > Enter_the_Supported_Account_Info_Here
105
107
106
108
> [!div renderon="docs"]
107
109
>
@@ -116,19 +118,22 @@ Select the option that's suitable to your development environment:
116
118
> > [!TIP]
117
119
> > 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.
118
120
>
121
+
> [!div class="sxs-lookup" renderon="portal"]
122
+
> #### Step 3: Your app is configured and ready to run
123
+
> We have configured your project with values of your app's properties.
119
124
120
-
#### Step 4: Run the project
125
+
> [!div renderon="docs"]
126
+
> #### Step 4: Run the project
121
127
122
-
If you're using [Node.js](https://nodejs.org/en/download/):
128
+
Run the project with a web server by using [Node.js](https://nodejs.org/en/download/):
123
129
124
130
1. To start the server, run the following command from the project directory:
125
-
126
-
```batch
127
-
npm install
128
-
npm start
129
-
```
130
-
131
+
```batch
132
+
npm install
133
+
npm start
134
+
```
131
135
1. Open a web browser and go to `http://localhost:3000/`.
136
+
132
137
1. Select **Sign In** to start the sign-in, and then call Microsoft Graph API.
133
138
134
139
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.
0 commit comments