Skip to content

ificator/microsoft-graph-explorer

 
 

Repository files navigation

Microsoft Graph Explorer

Build Status

The Microsoft Graph Explorer lets developers quickly navigate and test API endpoints.

The Graph Explorer is written in TypeScript and powered by:

Running the explorer locally

  • npm install to install project dependencies. npm is installed by default with Node.js.
  • npm start starts the TypeScript compiler in watch mode and the local server. It should open your browser automatically with the Graph Explorer at http://localhost:3000/.

Enabling authentication with your own credentials

  • You'll need to register an app on apps.dev.microsoft.com to configure the login page for your local Graph Explorer. Under Platforms click Add Platform and select Web. Allow Implicit Flow should be checked and set http://localhost:3000 as the redirect URL. You don't need a client secret since the explorer is a single page application.
  • Rename secrets.sample.js to secrets.js in the project root and insert your client ID.

Other commands

  • npm test to run tests from the command line for scenarios like parsing metadata and functional explorer tests.
  • npm run import:loc-strings combines all the loc files in translation_files/ to scripts/loc_strings.ts
  • npm run build:prod to build the minified explorer for production use.

Contributing

Please see the contributing guidelines.

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.

Sample queries

We want the explorer to have rich samples for calling all APIs in the Microsoft Graph. If you have ideas for sample queries, you can edit sample-queries.csv and then run npm run import:samples. This will convert the samples in the CSV file to structured objects in src/app/gen-queries.ts.

Some sample queries have ids or other string constants that are different for authenticated users and the sample tenant. These tokens are maintained in tokens.ts and more documentation for them can be found in base.ts.

When you send a pull request, please commit both the sample-queries.csv and the src/app/gen-queries.ts file. We will then review your sample queries, and ensure our demo tenant has some sample data for that query.

Permissions

Permissions like Mail.Read are listed in scopes.ts and each permission has a few properties, like its name and description.

 {
   name: "Calendars.ReadWrite",
   description: "Have full access to user calendars",
   longDescription: "Allows the app to create, read, update, and delete events in user calendars.",
   preview: false,
   admin: false
 }

Edits to this file can be made directly from Github.com so you don't even have to clone the project to add a new permission. You can also see a merged pull request for adding the Reports.Read.All permission.

Additional resources

Copyright

Copyright (c) 2017 Microsoft. All rights reserved.

About

Navigate and test Microsoft Graph endpoints

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 82.4%
  • HTML 8.2%
  • JavaScript 5.6%
  • CSS 3.8%