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
*[Configure a tunnel for your localhost](#Configure-a-tunnel-for-your-localhost)
15
+
16
+
*[Configure and run the web app](#Configure-and-run-the-web-app)
17
+
18
+
*[Contributing](#contributing)
19
+
20
+
*[Questions and Comments](#Questions-and-Comments)
21
+
22
+
*[Additional resources](#Additional-resources)
23
+
24
+
25
+
## Introduction
26
+
<aname="introduction"></a>
27
+
5
28
This Node.js sample shows how to start getting notifications from Microsoft Graph. The following are common tasks that a web application performs with Microsoft Graph webhooks.
6
29
7
30
- Sign-in your users with their work or school account to get an access token.
@@ -11,6 +34,7 @@ This Node.js sample shows how to start getting notifications from Microsoft Grap
11
34
- Request for more information in Microsoft Office 365 using data in the notification.
12
35
13
36
## Screenshots
37
+
<aname="screenshots"></a>
14
38
15
39
1. First you need sign in.
16
40
@@ -25,43 +49,49 @@ This Node.js sample shows how to start getting notifications from Microsoft Grap
To use the Webhook sample, you need the following:
30
55
31
56
-[Node.js](https://nodejs.org/) version 4 or 5.
32
57
- A [work or school account](http://dev.office.com/devprogram).
33
58
34
59
## Register the app
60
+
<aname="Register-the-app"></a>
35
61
36
62
This app uses the Azure AD endpoint, so you'll register it in the [Azure Portal](https://ms.portal.azure.com/#blade/Microsoft_AAD_IAM/ApplicationsListBlade).
37
63
38
-
1. Sign in to the portal using your work or school account.
64
+
1. Sign in to the Azure portal using either a work or school account or a personal Microsoft account.
65
+
1. If your account gives you access to more than one tenant, select your account in the top right corner, and set your portal session to the desired Azure AD tenant (using Switch Directory).
66
+
1. In the left-hand navigation pane, select the **Azure Active Directory service** , and then select **App registrations.**
67
+

39
68
40
69
1. Choose **New application registration**.
41
70
42
71
1. Enter a friendly name for the application.
43
72
1. Choose 'Web app/API' as the **Application Type**.
44
73
1. Enter `http://localhost:3000/callback` for the **Sign-on URL**.
74
+
1. In the Supported account types section, select Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com).
45
75
1. Click **Create**.
46
76
47
77
1. Choose your new application from the list of registered applications.
48
-
49
-
1. Copy and store the Application ID. This value is shown in the **Essentials** pane or in **Settings** > **Properties**.
50
-
51
-
1. To enable multi-tenanted support for the app, choose **Settings** > **Properties** and set **Multi-tenanted** to **Yes**.
52
-
78
+
On the app **Overview** page, find the **Application (client) ID** value and record it for later. You'll need it to configure the Visual Studio configuration file for this project.
1. Choose **Select an API** > **Microsoft Graph**, and then click **Select**.
57
-
1. Choose **Select permissions**, scroll down to **Delegated Permissions**, choose **Read user mail**, and then click **Select**.
84
+
1. Choose **Select permissions**, scroll down to **Delegated Permissions**, choose **Mail.Read**, and then click **Select**.
58
85
1. Click **Done**.
86
+

87
+
88
+
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.**
59
89
60
-
1. Choose **Settings** > **Keys**. Enter a description, choose a duration for the key, and then click **Save**.
90
+

61
91
62
92
1.**Important**: Copy the key value--this is your app's secret. You won't be able to access this value again after you leave this blade.
63
93
64
-
You'll use the application ID and secret to configure the app.
94
+
You'll use the **application ID** and **secret** to configure the app.
65
95
66
96
## Configure a tunnel for your localhost
67
97
@@ -90,6 +120,7 @@ You'll need the `NGROK_ID` value in the next section.
90
120
1. Replace `ENTER_YOUR_CLIENT_ID` with the client ID of your registered Azure application.
91
121
1. Replace `ENTER_YOUR_SECRET` with the client secret of your registered Azure application.
92
122
1. Replace `NGROK_ID` with the value in *https public URL* from the previous section.
123
+

93
124
1. Install the dependencies running the following command:
94
125
95
126
```Shell
@@ -129,4 +160,4 @@ Office 365 development questions? Post them to [Stack Overflow](http://stackover
129
160
130
161
## Copyright
131
162
132
-
Copyright (c) 2016 Microsoft. All rights reserved.
163
+
Copyright (c) 2019 Microsoft. All rights reserved.
0 commit comments