All samples

Preset for SharePoint Framework solutions

This sample contains a preset for simulating Microsoft Graph and SharePoint API errors for use with SharePoint Framework solutions. It contains specific URL exclusion rules to ensure that the API behind the hosted SPFx workbench is not intercepted by the proxy.

Waldek Mastykarz

Preset for SharePoint Framework solutions

Summary

This sample contains a preset for simulating Microsoft Graph and SharePoint API errors for use with SharePoint Framework solutions. It contains specific URL exclusion rules to ensure that the API behind the hosted SPFx workbench is not intercepted by the proxy.

Dev Proxy simulating API errors for an SPFx solution

Compatibility

Dev Proxy v2.1.0

Contributors

Version history

VersionDateComments
1.7February 4, 2026Updated to Dev Proxy v2.1.0
1.6January 18, 2026Moved config files to .devproxy folder
1.5January 5, 2026Updated to Dev Proxy v2.0.0
1.4June 27, 2025Updated to Dev Proxy v0.29.2
1.3October 28, 2024Updated plugin name
1.2January 17, 2024Updated plugin path
1.1November 14, 2023Renamed to Dev Proxy
1.0August 10, 2023Initial release

Minimal path to awesome

  • Get the sample:
    • Download just this sample:

      npx gitload-cli https://github.com/pnp/proxy-samples/tree/main/samples/spfx

      or

    • Download as a .ZIP file and unzip it, or

    • Clone this repository

  • Start Dev Proxy specifying the path to one of the mock files, eg. devproxy

Features

This preset contains the default Dev Proxy configuration extended with an exclusion of the pattern that matches APIs required by the hosted SharePoint Workbench so that they’re not intercepted by the proxy and don’t break the workbench.

Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

You can try looking at issues related to this sample to see if anybody else is having the same issues.

If you encounter any issues using this sample, create a new issue.

Finally, if you have an idea for improvement, make a suggestion.

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.