We've moved! You can contribute to our new repository here
The Microsoft Graph Explorer lets developers quickly navigate and test API endpoints.
The Graph Explorer is written in TypeScript and powered by:
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/.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. Select the delegated permissions that you'll want to use in your local Graph Explorer.secrets.sample.js
to secrets.js
in the project root and insert your client ID.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.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.
We want the explorer to have rich samples for calling all APIs in the Microsoft Graph. Choose the most relevant queries that demonstrate your feature. GET samples are the only queries that will work against our demo tenant. There are a few things that you need to check before you can add a sample query:
When your answer is yes to all of the questions, you are now ready to add your sample query. Before you do that, we need to check whether you require sample data.
Sample queries are added to sample-queries.csv. You’ll add your sample query to this file. Make sure you fill out all of the fields that are applicable to your query. Run npm run import:samples
after you’ve added your sample query. This will convert the samples in the CSV file to structured objects in src/app/get-queries.
Once you've added your sample queries, you'll need to add your query titles and category name to the en-US loc string files found in the translation directory. We'll localize and import the loc strings later.
Next, you need to run Graph Explorer on your development computer to verify that the samples are working as you expect. Go to Running the explorer locally to learn how to run Graph Explorer. Confirm that your samples work as expected with a signed in user account.
We now need to confirm that your samples will work against the demo tenant used when the user is not logged in. Run npm test
to test all of the GET queries against the demo tenant.
Now that you have a working sample query, build the Graph Explorer so that your changes are available to be staged. Run npm run build:prod
.
You are now ready to open your pull request to submit your changes. All GET sample queries are tested when you push changes or create a pull request. These samples all must pass before we can review your changes.
Note: If you see Unexpected token T in JSON at position 0 as an error when you run npm test, when you push your changes, or when you open a pull request, then you may have an unexpected space in your sample. If you get a timeout error, restart the Travis CI job. This type of error is often intermittent.
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.
Copyright (c) 2017 Microsoft. All rights reserved.