Skip to content

waldekmastykarz/graph-mocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft Graph mocks for Dev Proxy

This is a working repo for Microsoft Graph mocks for Dev Proxy. Download the ready-to-use sample from the sample gallery.

This repo contains Microsoft Graph mocks for Dev Proxy. Using these mocks, you can simulate calling Microsoft Graph endpoints from your application, without actually calling Microsoft Graph.

You'll find these mocks helpful if you want:

  • predictable data
  • quickly prototype an app without setting up auth
  • Microsoft Graph responses without creating the necessary objects behind them

Mock files

Mock files in this repo are built using the sample requests and responses from the Microsoft Graph API reference documentation.

File Description
graph-v1_0-proxy-mocks.json mock responses for endpoints that are a part of Microsoft Graph v1.0
graph-beta-proxy-mocks.json mock responses for endpoints that are a part of Microsoft Graph beta
graph-proxy-mocks.json mock responses for endpoints that are a part of Microsoft Graph v1.0 and beta
graph-v1_0-proxy-mocks-sandbox.json mock responses for endpoints that are a part of Microsoft Graph v1.0. Where possible, uses the same data as Microsoft Graph Explorer
graph-beta-proxy-mocks-sandbox.json mock responses for endpoints that are a part of Microsoft Graph beta. Where possible, uses the same data as Microsoft Graph Explorer
graph-proxy-mocks-sandbox.json mock responses for endpoints that are a part of Microsoft Graph v1.0 and beta. Where possible, uses the same data as Microsoft Graph Explorer

Use the mock files

To use any of the mock files, download the file, and then start the Dev Proxy passing the path to the downloaded mock file, eg.

m365proxy --mocks-file ./graph-proxy-mocks-sandbox.json

When you call a Microsoft Graph endpoint, that's covered by one of the mocks, Dev Proxy, will send the corresponding mock response to your application.

More information