Getting Started with Microsoft Graph and Throttling
Skills:
API Design70%
Key Takeaways
Microsoft Graph throttling limits concurrent calls to prevent overuse of resources, and implements rate-limiting using HTTP status code 429 and retry-after headers
Full Transcript
hello everyone thanks for joining us I'm sorry and today I'm joined by Peter well today we're going to be talking about straddling so Peter what is startling and why do we even have it in Microsoft graph sure every web api needs some form of rate-limiting especially a public API that is exposed for everyone to call we don't have any way of influencing how you're gonna write your code so as a service we need to protect ourselves from applications calling too much consuming too many resources which would affect other applications trying to call Microsoft graph so and it happens all the time we see it in our internal development as well as third-party developers not fully realizing what the volume of all their calls will be and they often find out in production so we have we need a way to not only protect the service but also to let them know that maybe they were making too many calls ok ok so so how does Microsoft graph implement this targeting at some level it's very simple when the when the API decides that you're calling it too much it responds with an error with a status code 4 to 9 okay and it provides a retry after volume panda header so it's basically telling you hey you're calling me too much why don't you back off wait this period of time and then you can try again ok and it's very it's very important that your application code expects that error mmm and it that it does the right thing when it sees it if you for example just kept retrying all the time without backing off the service will keep throttling you and you might never recover ok ok so that the time keeps going in loops or the retry headers what you said 'keep yes it keeps going back ok exactly so let me show you what that looks like in practice absolutely so I have an app here that I wrote in c-sharp ok it's more of a background process app its job is to call Microsoft graph as far as fast as it can - in this case perform license removal operations in a director directory and I know that API is a fairly low throttling level so I picked it for this example okay so what I want to show here I'll just run the app and it's really issuing parallel requests against Microsoft graph okay and I set a break breakpoint somewhere where where I catch that 4:00 to 9:00 and response okay that I mentioned so here we are I'll show you how what this looks like in JSON format so as you can see here in the headers the status is four to nine I'm being throttled and in the headers section I have the retry after header okay and with the value of ten in this case okay since these are dynamic values and that's ten second seconds yes and here I have some human readable information in this case it's telling me that the specific reason why I got through all the implementing implemented by Azure Active Directory ok so what I do here in my application I take that value from the header and I read that request to my retry queues so I implemented retry queues and I put it there with the 10-second interval and my app will pick that request later on ok so if you had a user interface application you've probably handled it a different way you tell the user about the fact that they need to wait a little bit but here I'm just going through all the requests as fast as I can and when I get throttle I just pause and wait a little bit alright that was awesome Peter thank you so much for the overview about darling and thank you everyone for joining us and if you want more information on throttling please look at our documentation on graph Microsoft com thank you
Original Description
Throttling limits the number of concurrent calls to a service to prevent overuse of resources. Microsoft Graph is designed to handle a high volume of requests. If an overwhelming number of requests occurs, throttling helps maintain optimal performance and reliability of the Microsoft Graph service. Learn more about throttling guidance in this video.
To learn more about Microsoft Graph and Throttling,
visit https://docs.microsoft.com/en-us/graph/throttling.
For additional Microsoft Graph tools and resources, visit https://graph.microsoft.com.
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Microsoft 365 Developer · Microsoft 365 Developer · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Adaptive Cards community call-February 2019
Microsoft 365 Developer
PowerApps community call-February 2019
Microsoft 365 Developer
Microsoft Graph community call-March 2019
Microsoft 365 Developer
Office Add ins community call-March 2019
Microsoft 365 Developer
PowerApps community call-March 2019
Microsoft 365 Developer
Microsoft Teams community call-March 2019
Microsoft 365 Developer
Using React and Office UI Fabric React Components
Microsoft 365 Developer
Build Microsoft Teams customization using SharePoint Framework
Microsoft 365 Developer
Microsoft Graph community call-April 2019
Microsoft 365 Developer
Using Change Notifications and Track Changes with Microsoft Graph
Microsoft 365 Developer
Office Add Ins community call-April 2019
Microsoft 365 Developer
Adaptive Cards community call-April 2019
Microsoft 365 Developer
Microsoft Teams community call-April 2019
Microsoft 365 Developer
Getting Started with Microsoft Graph and Application Registration
Microsoft 365 Developer
Getting Started with Microsoft Graph and the Directory API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Microsoft Teams
Microsoft 365 Developer
Getting Started with Microsoft Graph Explorer
Microsoft 365 Developer
Getting Started with Microsoft Graph
Microsoft 365 Developer
Getting Started with Microsoft Graph and Mail API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Office 365 Groups
Microsoft 365 Developer
Getting Started with Microsoft Graph and the Calendar API
Microsoft 365 Developer
Getting Started with the Microsoft Graph Toolkit
Microsoft 365 Developer
Getting Started with Microsoft Graph and JavaScript SDKs
Microsoft 365 Developer
Getting Started with Microsoft Graph and .NET SDKs
Microsoft 365 Developer
Discover how businesses can be more productive with Microsoft 365 integrations
Microsoft 365 Developer
Adaptive Cards community call-May 2019
Microsoft 365 Developer
Office Add-ins community call-May 2019
Microsoft 365 Developer
Why We Built on Microsoft Teams
Microsoft 365 Developer
Microsoft Teams community call-May 2019
Microsoft 365 Developer
Microsoft Graph community call-June 2019
Microsoft 365 Developer
Build Angular SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
Office Add -ins community call-June 2019
Microsoft 365 Developer
Build Android native apps with the Microsoft Graph Android SDK - June 2019
Microsoft 365 Developer
Build MVC apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Authenticate and connect with Microsoft Graph - June 2019
Microsoft 365 Developer
Microsoft Graph data connect - June 2019
Microsoft 365 Developer
Change notifications with Microsoft Graph - June 2019
Microsoft 365 Developer
Build iOS native apps with the Microsoft Graph REST API - June 2019
Microsoft 365 Developer
Build Node.js Express apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Smart UI with Microsoft Graph - June 2019
Microsoft 365 Developer
Leveraging the Microsoft Graph API from the SharePoint Framework - June 2019
Microsoft 365 Developer
Build UWP apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Build React SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
Getting Started with Microsoft Graph and Batching
Microsoft 365 Developer
Getting Started with Microsoft Graph and Change Notifications
Microsoft 365 Developer
Getting Started with Microsoft Graph and Consent Permissions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Education
Microsoft 365 Developer
Getting Started with Microsoft Graph and Financials
Microsoft 365 Developer
Getting Started with Microsoft Graph and Excel
Microsoft 365 Developer
Getting Started with Microsoft Graph and Data Connect
Microsoft 365 Developer
Getting Started with Microsoft Graph and Intune
Microsoft 365 Developer
Getting Started with Microsoft Graph and Notifications
Microsoft 365 Developer
Getting Started with Microsoft Graph and OneNote
Microsoft 365 Developer
Getting Started with Microsoft Graph and OneDrive
Microsoft 365 Developer
Getting Started with Microsoft Graph and Open Extensions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Paging
Microsoft 365 Developer
Getting Started with Microsoft Graph and Schema Extensions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Security API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Query Parameters
Microsoft 365 Developer
Getting Started with Microsoft Graph and Reporting API
Microsoft 365 Developer
More on: API Design
View skill →Related Reads
📰
📰
📰
📰
AI Theatre: The Gap Between Talking About AI and Actually Using It
Medium · Cybersecurity
How to Structure Content for AI-First Indexing: 7 Rules That Get You Cited
Medium · AI
The Last Premium: What Stays Expensive When Thinking Gets Free
Medium · Data Science
Microsoft said the patches would get bigger. I measured how much bigger.
Dev.to · Erik Rekola
🎓
Tutor Explanation
DeepCamp AI