Git Product home page Git Product logo

o365-nodejs-microsoft-graph-connect's Introduction

Office 365 Node.js Connect sample using Microsoft Graph

Connecting to Office 365 is the first step every app must take to start working with Office 365 services and data. This sample shows how to connect and then call one endpoint through the Microsoft Graph API (previously called Office 365 unified API), and uses the Office Fabric UI to create an Office 365 experience.

Try out the Get started with Office 365 APIs page which simplifies registration so you can get this sample running faster.

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:

  • An Office 365 account. You can sign up for an Office 365 Developer subscription that includes the resources that you need to start building Office 365 apps.

    Note: If you already have a subscription, the previous link sends you to a page with the message Sorry, you can’t add that to your current account. In that case use an account from your current Office 365 subscription.

    If you are already signed-in to Office 365, the Sign-in button in the previous link shows the message Sorry, we can't process your request. In that case sign-out from Office 365 in that same page and sign-in again.

  • A Microsoft Azure tenant to register your application. Azure Active Directory (AD) provides identity services that applications use for authentication and authorization. A trial subscription can be acquired here: Microsoft Azure.

    Important: You also need to make sure your Azure subscription is bound to your Office 365 tenant. To do this, see the Active Directory team's blog post, Creating and Managing Multiple Windows Azure Active Directories. The section Adding a new directory will explain how to do this. You can also see Set up your Office 365 development environment and the section Associate your Office 365 account with Azure AD to create and manage apps for more information.

  • A client ID, client secret, and redirect URI values of an application registered in Azure. This sample application must be granted the Send mail as signed-in user permission for Microsoft Graph. Add a web application in Azure and grant proper permissions to it.

    Note: During the app registration process, make sure to specify http://localhost:3000/login as the Sign-on URL.

  • Consult the section Configure and run the app for platform specific prerequisites.

Configure and run the app

  1. Update authHelper.js/client_id with your application's client id
  2. Update authHelper.js/client_secret with your application's client secret
  3. Update authHelper.js/redirect_uri with your application's redirect uri

Prerequisites

  • node - JavaScript runtime built on Chrome V8
  • npm - Node Package Manager

To run the app, type the following into your command line:

  1. npm install - install application dependencies
  2. npm start - starts the application server

Launch the app in your browser

Once the application server has been started, open your favorite web browser to http://localhost:3000

Questions and comments

We'd love to get your feedback about the Office 365 Node.js Connect sample. You can send your questions and suggestions to us in the Issues section of this repository.

Questions about Office 365 development in general should be posted to Stack Overflow. Make sure that your questions or comments are tagged with [Office365] and [MicrosoftGraph].

Additional resources

Copyright (c) 2015 Microsoft. All rights reserved.

o365-nodejs-microsoft-graph-connect's People

Contributors

davidchesnut avatar iambmelt avatar martellaj avatar ricalo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.