Coder Social home page Coder Social logo

unmask06 / mslearn-retrieve-m365-data-with-msgraph-quickstart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoftdocs/mslearn-retrieve-m365-data-with-msgraph-quickstart

0.0 0.0 0.0 1.07 MB

Quick start sample using JavaScript to retrieve M365 data using Microsoft Graph

License: Creative Commons Attribution 4.0 International

JavaScript 78.22% HTML 21.78%

mslearn-retrieve-m365-data-with-msgraph-quickstart'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

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

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

Contributors

rabwill avatar bobgerman avatar waldekmastykarz avatar unmask06 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.