Code Monkey home page Code Monkey logo

retrieve-m365-data-with-msgraph's Introduction

A JavaScript application to retrieve Microsoft 365 data using Microsoft Graph ๐Ÿš€

Prerequisites

Register Azure AD APP

You have to register an application in Azure Active Directory in order to run this application. You could do it manually in the Azure Portal.

Register AAD app Manually in Azure Portal

  1. Register a new application in the Azure Portal.
  2. Ensure that the application is enabled for the authorization code flow with PKCE. This will require that you redirect URI configured in the portal is of type SPA.
  3. For this sample we will create a single tenant application

Configure the sample

  1. Copy the value of the Application (client) ID of the newly registered application from Azure Portal. You can get this from the overview page of the newly registered application.
  2. In the auth.js file, on line 4, replace the value of the clientId property with the copied Application (client) ID
  3. Copying the value of the Directory (tenant) ID of the newly registered application from Azure Portal. You can get this from the overview page of the newly registered application.
  4. In the auth.js file, on line 6, replace the value of the authority property with the Directory (tenant) ID copied in above step, eg https://login.microsoftonline.com/0be187e2-aa5c-464a-bc8b-74b0416b4c3a, since this is a single tenant application.
  5. In case you created a multi-tenant application then comment out line 6 in auth.js. You don't need to pass the authority.

Run the app

  • In the command line, go to the project root folder mslearn-retrieve-m365-data-with-msgraph-quickstart.
  • Run below script in the command line. This will open your application in the browser with the url http://localhost:8080.
npm start

If the configuration of the app is successful, the app will be as shown below:

Working app

retrieve-m365-data-with-msgraph's People

Contributors

timothynn 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.