Learn how Microsoft Graph uses throttling to maintain service health and how address this feature when creating applications.
This module is also published as a Microsoft Learn module: Optimize Network Traffic with Microsoft Graph
The lab for this module is available in multiple units within the associated Microsoft Learn module. Use the following links to jump to the specific unit. Each Microsoft Learn unit represents a different lab exercise & demo in the presentation.
-
Exercise: Understand throttling in Microsoft Graph
In this exercise, you will create a new Azure AD web application registration using the Azure Active Directory admin center, a .NET Core console application and query the Microsoft Graph. You will issue many requests in parallel to trigger your requests to be throttled. This will allow you to see the response you will receive.
-
Exercise: Avoid throttling & implement throttling strategies
In this exercise, you'll use the Azure AD application and .NET console application you previously created and modify them to demonstrate two strategies to account for throttling in your application. One strategy used the HttpClient object but required you to implement the detect, delay and retry logic yourself when requests were throttled. The other strategy used the Microsoft Graph SDKs included support for handling this same scenario.
-
Exercise: Eliminate polling Microsoft Graph with delta query
In this exercise, you'll use the Graph Explorer to create and issue a single request that contains multiple child requests. This batching of requests enables developers to submit multiple requests in a single round-trip request to Microsoft Graph, creating more optimized queries.
- Understand throttling in Microsoft Graph
- Avoid throttling & implement throttling strategies
- Eliminate polling Microsoft Graph with delta query
This module has been recorded and is available in the Office Development YouTube channel: Optimize Network Traffic with Microsoft Graph
Roles | Author(s) |
---|---|
Lab / Slides / Demos | Andrew Connell (Microsoft MVP, Voitanos) @andrewconnell |
QA | Rob Windsor (Microsoft MVP, PAIT Group) @rob-windsor |
Sponsor / Support | Jeremy Thake (Microsoft) @jthake |
Version | Date | Comments |
---|---|---|
1.5 | September 10, 2020 | FY2021Q1 content refresh |
1.4 | June 11, 2020 | FY2020Q4 content refresh |
1.3 | February 22, 2020 | FY2020Q3 content refresh |
1.2 | December 9, 2019 | FY2020Q2 content refresh |
1.1 | September 30, 2019 | Add: copyright statement to code; screencast link, exercise links, MS Learn module link |
1.0 | September 11, 2019 | New module published |
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.