Office 365 Node.js Connect sample using Microsoft Graph in a docker container
This code is a copy found in the examples on Office development. I've added a Dockerfile here so that this code can run from a docker container. This code is linked to https://hub.docker.com/r/rickvanrousselt/graphconnector/ where after a commit it will automatically build a new docker image.
The sample uses the v2.0 authentication endpoint, which enables users to sign in with either their personal or work or school Microsoft accounts.
Note: For an in-depth look at the code for calling the Microsoft Graph API in a Node.js app, see Call Microsoft Graph with a Node.js app.
To use the Office 365 Node.js Connect sample, you need the following:
Sign into the App Registration Portal using either your personal or work or school account.
Select Add an app.
Enter a name for the app, and select Create application.
The registration page displays, listing the properties of your app.
Under Platforms, select Add platform.
Add the following to the list of Redirect URIs:
Under Application Secrets click Generate New Password.
Copy the New password generated and Application Id, you'll need them in the next section.
Configure and run the app
authHelper.js/client_idwith your application id
authHelper.js/client_secretwith your password
To run the app, type the following into your command line:
docker run -d -p 80:3000 rickvanrousselt/graphconnector
Launch the app in your browser
Once the application server has been started, open your web browser to