Skip to content

An example of how to authenticate and use the Microsoft Graph API in the context of an Angular application.

Notifications You must be signed in to change notification settings

astegmaier/graph-playground

Repository files navigation

Microsoft Graph Playground

You can use this app to experiment with the Microsoft Graph API in the context of a modern web app. It is hosted at https://graphplayground.z22.web.core.windows.net/.

Architecture

The app is based on the Angular CLI, with the Angular Material Table Component and some structure stolen from the Angular + ASP.NET Core Template. It uses MSAL to authenticate against both consumer and business accounts.

There are two ways that it can make calls to the graph:

  1. Through the Graph SDK (see services/graph-sdk.service.ts in the source code):
  2. Through the angular http client (see services/graph.service.ts in the source code):

It also uses the microsoft-graph-types library to provide strong typing for the objects returned from the graph.

Installation Instructions

Prerequisites: NPM or Yarn, the Angular CLI, and a git client.

  1. Clone this repo:

    git clone https://github.com/astegmaier/graph-playground.git
    
  2. Restore the npm packages:

    yarn install
    

    or

    npm install
    
  3. Now, you can build and host the app with the Angular CLI development server at https://localhost:4200 by running:

    ng serve
    

This will allow you to tweak the app locally and experiment. If you would like to deploy your creation publicly to share with others, you can follow these steps.

About

An example of how to authenticate and use the Microsoft Graph API in the context of an Angular application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published