No description, website, or topics provided.
JavaScript HTML CSS Batchfile Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README-Localized
bin
public
readme-imgs
routes
tests
views
.eslintrc.js
.gitignore
CONTRIBUTING.md
Dockerfile
NOTICES.md
README.md
app.js
authHelper.js
dailyBuildPackage.json
emailer.js
gulpfile.js
package.json
requestUtil.js

README.md

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.

Office 365 Node.js Connect sample screenshot

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.

Prerequisites

To use the Office 365 Node.js Connect sample, you need the following:

##Register and configure the app

  1. Sign into the App Registration Portal using either your personal or work or school account.

  2. Select Add an app.

  3. Enter a name for the app, and select Create application.

    The registration page displays, listing the properties of your app.

  4. Under Platforms, select Add platform.

  5. Select Web.

  6. Add the following to the list of Redirect URIs:

    http://localhost/login
    
  7. Under Application Secrets click Generate New Password.

  8. Copy the New password generated and Application Id, you'll need them in the next section.

  9. Click Save.

Configure and run the app

  1. Update authHelper.js/client_id with your application id
  2. Update authHelper.js/client_secret with 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 http://localhost

Questions and comments

Additional resources