Microsoft Graph Developer Proxy v0.7 with extended configuration options and improved simulating throttling

Waldek Mastykarz

Garry Trinder

Build resilient and performant apps with the latest preview version of the Microsoft Graph Developer Proxy. In this new version, we’re excited to introduce the ability to exclude specific URLs, improved throttling and streamlined UI.

Download Microsoft Graph Developer Proxy v0.7 and check if your apps properly handle API errors.

Support for excluding URLs

Developer Proxy allows you to simulate behaviors on any API. Using its configuration, you can specify the list of URLs that match your API calls, and that you want to intercept to simulate errors on.

In some cases, though, you might want to exclude specific URLs. One example of this is, when you want to test your SharePoint Framework solution that uses SharePoint REST APIs. You’ll want to simulate errors on all API calls, except for /_api/web/GetClientSideComponents, which is responsible for loading web parts in the web part toolbox. If that call fails, you won’t be able to add the web part to the workbench to test it.

To exclude a URL from being intercepted, prepend it with a ! (exclamation mark), for example:

When excluding URLs, keep in mind that Developer Proxy will look for matching URLs in the order in which they’re defined in the configuration. If you want to exclude specific URLs, you should define them first, before more global URL matches.

Streamlined configuration

Developer Proxy allows you to configure its settings in a flexible way: when installing it, you get a global configuration file that works out of the box, and you can also define project-specific presets that have specific settings for the different simulations that you need in your projects.

To simplify configuring Developer Proxy, we’ve made several changes.

  • Renamed config file, to avoid conflicts with settings of .NET apps that you’d want to test with proxy, we renamed the default Developer Proxy config file to mgdprc.json. That way, if you have appsettings.json in your .NET app, Developer Proxy won’t try loading it as its own configuration file.
  • Fallback to global configuration, if you don’t specify a config file to use when starting the proxy, it will first search for mgdprc.json in the current working folder. If it doesn’t find it, it will load the mgdprc.json file from the folder where the proxy is installed.
  • Relative path improvements, to clarify what relative paths are considered relative to, we adjusted the logic, so that relative paths are considered relative to the place where they’re referenced. For example, if you use a relative path to a plugin DLL in the config file, that relative path will be considered relative to the location of the config file. For more information about how we resolve relative paths, see the documentation.
  • Introduced ~appFolder token, we’ve introduced the ~appFolder token which you can use in any path in the proxy’s configuration to refer to the location of the main proxy executable file (mgdp.exe). This is convenient when you have a project-specific configuration file but want to refer to the globally installed plugins.

Updated UI

When you use Developer Proxy for testing your apps, you’ll likely see the proxy log many messages in its output. To make the output more readable, we shortened the labels, so that you can more easily scan through them and find the relevant messages.

Additional improvements

Expose –failure-rate option globally

In the previous versions of Developer Proxy, the –failure-rate option only affected the configuration of the Microsoft Graph Random Errors plugin. If you were using the Generic Random Errors plugin, you could only configure its failure rate through the config file. From this version, the value specified in the –failure-rate option affects both Microsoft Graph and Generic Random Errors plugins.

Improved throttling behavior

In the previous version of the proxy, we had a bug where a request that was throttled would be always passed through the next time it was intercepted. Since this isn’t representative behavior, we adjusted the check, so that requests that are no longer throttled, are subject to random error behavior, where they can either result in a random error or be passed through to the API.

Try it now

Download Microsoft Graph Developer Proxy v0.7 and check if your apps properly handle API errors.

We’re excited about this new version and can’t wait for you to try it out. We’re looking forward to hearing from you about these improvements and how we can continue to make the Microsoft Graph Developer Proxy even better.

Follow us on @Microsoft365Dev on Twitter to stay up to date on the latest news and announcements.