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/.
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:
- Through the Graph SDK (see
services/graph-sdk.service.ts
in the source code): - 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.
Prerequisites: NPM or Yarn, the Angular CLI, and a git client.
-
Clone this repo:
git clone https://github.com/astegmaier/graph-playground.git
-
Restore the npm packages:
yarn install
or
npm install
-
Now, you can build and host the app with the Angular CLI development server at http://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.