Skip to content

Commit ef4e54b

Browse files
committed
Add README and version file to demo folder
1 parent afca5ee commit ef4e54b

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

demo/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# How to run the completed project
2+
3+
## Prerequisites
4+
5+
To run the completed project in this folder, you need the following:
6+
7+
- [Node.js](https://nodejs.org) installed on your development machine. If you do not have Node.js, visit the previous link for download options. (**Note:** This tutorial was written with Node version 12.6.1. The steps in this guide may work with other versions, but that has not been tested.)
8+
- Either a personal Microsoft account with a mailbox on Outlook.com, or a Microsoft work or school account.
9+
10+
If you don't have a Microsoft account, there are a couple of options to get a free account:
11+
12+
- You can [sign up for a new personal Microsoft account](https://signup.live.com/signup?wa=wsignin1.0&rpsnv=12&ct=1454618383&rver=6.4.6456.0&wp=MBI_SSL_SHARED&wreply=https://mail.live.com/default.aspx&id=64855&cbcxt=mai&bk=1454618383&uiflavor=web&uaid=b213a65b4fdc484382b6622b3ecaa547&mkt=E-US&lc=1033&lic=1).
13+
- You can [sign up for the Office 365 Developer Program](https://developer.microsoft.com/office/dev-program) to get a free Office 365 subscription.
14+
15+
## Register a web application with the Azure Active Directory admin center
16+
17+
1. Open a browser and navigate to the [Azure Active Directory admin center](https://aad.portal.azure.com). Login using a **personal account** (aka: Microsoft Account) or **Work or School Account**.
18+
19+
1. Select **Azure Active Directory** in the left-hand navigation, then select **App registrations** under **Manage**.
20+
21+
![A screenshot of the App registrations ](/tutorial/images/aad-portal-app-registrations.png)
22+
23+
1. Select **New registration**. On the **Register an application** page, set the values as follows.
24+
25+
- Set **Name** to `Node.js Graph Tutorial`.
26+
- Set **Supported account types** to **Accounts in any organizational directory and personal Microsoft accounts**.
27+
- Under **Redirect URI**, set the first drop-down to `Web` and set the value to `http://localhost:3000/auth/callback`.
28+
29+
![A screenshot of the Register an application page](/tutorial/images/aad-register-an-app.png)
30+
31+
1. Choose **Register**. On the **Node.js Graph Tutorial** page, copy the value of the **Application (client) ID** and save it, you will need it in the next step.
32+
33+
![A screenshot of the application ID of the new app registration](/tutorial/images/aad-application-id.png)
34+
35+
1. Select **Authentication** under **Manage**. Locate the **Implicit grant** section and enable **ID tokens**. Choose **Save**.
36+
37+
![A screenshot of the Implicit grant section](/tutorial/images/aad-implicit-grant.png)
38+
39+
1. Select **Certificates & secrets** under **Manage**. Select the **New client secret** button. Enter a value in **Description** and select one of the options for **Expires** and choose **Add**.
40+
41+
![A screenshot of the Add a client secret dialog](/tutorial/images/aad-new-client-secret.png)
42+
43+
1. Copy the client secret value before you leave this page. You will need it in the next step.
44+
45+
> [!IMPORTANT]
46+
> This client secret is never shown again, so make sure you copy it now.
47+
48+
![A screenshot of the newly added client secret](/tutorial/images/aad-copy-client-secret.png)
49+
50+
## Configure the sample
51+
52+
1. Rename the `.env.example` file to `.env`.
53+
1. Edit the `.env` file and make the following changes.
54+
1. Replace `YOUR_APP_ID_HERE` with the **Application Id** you got from the App Registration Portal.
55+
1. Replace `YOUR_APP_PASSWORD_HERE` with the password you got from the App Registration Portal.
56+
1. In your command-line interface (CLI), navigate to this directory and run the following command to install requirements.
57+
58+
```Shell
59+
npm install
60+
```
61+
62+
## Run the sample
63+
64+
1. Run the following command in your CLI to start the application.
65+
66+
```Shell
67+
npm start
68+
```
69+
70+
1. Open a browser and browse to `http://localhost:3000`.

demo/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.2

0 commit comments

Comments
 (0)