{"id":14794,"date":"2023-07-27T01:36:41","date_gmt":"2023-07-27T08:36:41","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=14794"},"modified":"2023-07-27T08:04:53","modified_gmt":"2023-07-27T15:04:53","slug":"microsoft-365-developer-proxy-v0-10-with-support-for-batching-and-improved-select-guidance","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/microsoft-365-developer-proxy-v0-10-with-support-for-batching-and-improved-select-guidance\/","title":{"rendered":"Microsoft 365 Developer Proxy v0.10 with support for batching and improved $select guidance"},"content":{"rendered":"<p>In the latest preview version of the Microsoft 365 Developer Proxy, we are introducing the preview ability to fail and detect minimal permissions in batch requests, as well as improving the $select guidance to help you build more performant applications.<\/p>\n<p><a href=\"https:\/\/aka.ms\/m365\/proxy\/download\">Download Microsoft 365 Developer Proxy v0.10<\/a> and check if your apps properly handle API errors.<\/p>\n<h2>Batching support<\/h2>\n<p>Batching enables developers to combine several requests into a single batch request to send to Microsoft Graph API. This can save significant network latency and optimize application performance.<\/p>\n<p>In this version, we have added support for batch requests to the minimal permissions and random error plugins for Microsoft Graph.<\/p>\n<p>Let\u2019s consider the batch request below. This request will return the current users profile, emails and calendar events in a single request.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/garrytrinder\/5cb396a48a0f5dddf856a71beaf33d91.js\"><\/script><\/p>\n<p>When using the recording mode to record proxy activity, each endpoint used in batch requests is now displayed in the summary output along with the minimal permissions needed.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-14796\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-1.png\" alt=\"Microsoft 365 Developer Proxy displaying the minimal required permissions for a batch request.\" width=\"1114\" height=\"493\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-1.png 1114w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-1-300x133.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-1-1024x453.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-1-768x340.png 768w\" sizes=\"(max-width: 1114px) 100vw, 1114px\" \/><\/p>\n<p><em>Microsoft 365 Developer Proxy displaying the minimal required permissions for a batch request<\/em><\/p>\n<p>If any of the requests in the batch are failed by the Developer Proxy, a 424 (Failed Dependency) status code response is now returned.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-14797\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-2.png\" alt=\"Microsoft 365 Developer Proxy displaying the result of a failed batch request\" width=\"1114\" height=\"474\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-2.png 1114w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-2-300x128.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-2-1024x436.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/07\/word-image-14794-2-768x327.png 768w\" sizes=\"(max-width: 1114px) 100vw, 1114px\" \/><\/p>\n<p><em>Microsoft 365 Developer Proxy displaying the result of a failed batch request<\/em><\/p>\n<h2>Improved $select guidance<\/h2>\n<p>Previously, we introduced support for showing guidance when the $select system query option is not used on requests to Microsoft Graph endpoints.<\/p>\n<p>This guidance recommends that you use $select to limit the properties returned by request, to those only needed by your app. Limiting the properties returned will reduce network load and help improve your app&#8217;s performance.<\/p>\n<p>Our original approach applied this guidance globally to all endpoints. However, not all endpoints in Microsoft Graph API support the use of the $select system query option.<\/p>\n<p>Unfortunately, this led to some false positives being generated by the Developer Proxy.<\/p>\n<p>In this version, we have improved the Microsoft Graph $select guidance plugin by using information from the Microsoft Graph Open API specification.<\/p>\n<p>The Developer Proxy will now only return guidance for requests made to endpoints that support the $select system query option.<\/p>\n<h2><span style=\"font-size: 36pt;\">What\u2019s next<\/span><\/h2>\n<h3>Further support for batching<\/h3>\n<p>While we have made improvements to support batching in this release, we will continue our work to further improve batching support in the Developer Proxy by adding support for batching to the Retry-After and Rate Limiting plugins.<\/p>\n<h2>Try it now<\/h2>\n<p><a href=\"https:\/\/aka.ms\/m365\/proxy\/download\">Download Microsoft 365 Developer Proxy v0.10<\/a> and check if your apps properly handle API errors.<\/p>\n<p>We\u2019re excited about this new version and can\u2019t wait for you to try it out. We look forward to <a href=\"https:\/\/github.com\/microsoft\/m365-developer-proxy\/wiki\/Get-help-and-support\">hearing from you<\/a> about these improvements and how we can continue to make the Microsoft 365 Developer Proxy even better.<\/p>\n<p>Follow us on Twitter <a href=\"https:\/\/twitter.com\/Microsoft365Dev\">@Microsoft365Dev<\/a> to stay up to date on the latest developer news and announcements.<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p> Microsoft 365 Developer Proxy v0.10 introduces the preview ability to fail and detect minimal permissions in batch requests and improves the $select guidance to help you build more performant applications.<\/p>\n","protected":false},"author":100385,"featured_media":14808,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3],"tags":[222],"class_list":["post-14794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365-developer","category-microsoft-graph","tag-developer-proxy"],"acf":[],"blog_post_summary":"<p> Microsoft 365 Developer Proxy v0.10 introduces the preview ability to fail and detect minimal permissions in batch requests and improves the $select guidance to help you build more performant applications.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/14794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/100385"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=14794"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/14794\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/14808"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=14794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=14794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=14794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}