Microsoft Graph API and test with Microsoft 365 Developer Proxy
Microsoft SharePoint Graph API setup and using Microsoft 365 Developer Proxy is a command line tool to simulates real world behaviors of Microsoft Graph and other APIs, locally.
MICROSOFT 365 DEVELOPER PROXY
Basant Pandey
10/28/20231 min read
Introduction
I recently tested some scenarios to mock the real API response codes like 429 and 500.
Setup Your System
Update app settings based on your Shareoint tenant appsettings.json
Create Site Collection in your Tenant (Get the Site ID)
Create a List a SharePoint List (Get the List ID)
Use Graph Explorer to test your quries
Use Client ID and Client certificate to access to token.
Use Graph Developer API Testing tool to check the retry attempts in action.
Pnp-Powershell link
Create Site collection
Login to SharePoint Admin create site collection
Using team site template to create the site.
Setup your data
Use the Site ID to update SiteId variable in appsettings.json
Use the List ID to update SiteId variable in appsettings.json
Execute Graph Qeury with Retry Project
Execute the code without a proxy tool.
Download Exe from the Graph API Proxy tool
Open Command Prompt type. m365proxy --failure-rate 50 --no-mocks --allowed-errors 429