https://github.com/sebastienlevert/msgraph-training-nodeexpressapp-mgt
Complete Node + Express app running with the Microsoft Graph Toolkit
https://github.com/sebastienlevert/msgraph-training-nodeexpressapp-mgt
Last synced: 3 months ago
JSON representation
Complete Node + Express app running with the Microsoft Graph Toolkit
- Host: GitHub
- URL: https://github.com/sebastienlevert/msgraph-training-nodeexpressapp-mgt
- Owner: sebastienlevert
- Created: 2020-12-01T15:38:06.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-01T15:45:21.000Z (over 4 years ago)
- Last Synced: 2025-01-20T06:19:08.138Z (5 months ago)
- Language: Handlebars
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to run the completed project
## Prerequisites
To run the completed project in this folder, you need the following:
- [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.)
- Either a personal Microsoft account with a mailbox on Outlook.com, or a Microsoft work or school account.If you don't have a Microsoft account, there are a couple of options to get a free account:
- 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).
- You can [sign up for the Office 365 Developer Program](https://developer.microsoft.com/office/dev-program) to get a free Office 365 subscription.## Register a web application with the Azure Active Directory admin center
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**.
1. Select **Azure Active Directory** in the left-hand navigation, then select **App registrations** under **Manage**.
1. Select **New registration**. On the **Register an application** page, set the values as follows.
- Set **Name** to `Node.js Graph Tutorial`.
- Set **Supported account types** to **Accounts in this organizational directory only (Contoso only - Single tenant)**.
- Under **Redirect URI**, set the first drop-down to `Web` and set the value to `http://localhost:4000`.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.
1. Select **Authentication** under **Manage**. Locate the **Implicit grant** section and enable **ID tokens**. Choose **Save**.
## Configure the sample
1. Rename the `.env.example` file to `.env`.
1. Edit the `.env` file and make the following changes.
1. Replace `%YOUR_APP_ID_HERE%` with the **Application Id** you got from the App Registration Portal.
1. Replace `%YOUR_TENANT_NAME_HERE%` with the name of your tenant (ex: **tenant**.sharepoint.com or **tenant**.onmicrosoft.com)
1. In your command-line interface (CLI), navigate to this directory and run the following command to install requirements.```Shell
npm install
```## Run the sample
1. Run the following command in your CLI to start the application.
```Shell
npm start
```1. Open a browser and browse to `http://localhost:4000`.