In Part 1, we explored the fundamentals of 429 errors in Microsoft Graph API, including retry logic, batching, and the nuances of AppResourceUnit (ARU) throttling. In this follow-up, we dive deeper into how rate limits are enforced at the application level, how resource units are consumed in SharePoint Graph API calls, and how telemetry analysis can help optimize usage.
🔍 App-Level Rate Limiting: It’s Not Just About Services
A common misconception is that throttling is tied to specific Microsoft 365 services like SharePoint or OneDrive. In reality, rate limits are enforced per client application, not per service. This means that every request your app makes—whether via Microsoft Graph, CSOM, or REST—counts toward the app’s usage quota.
These quotas are license-based, meaning the number of Microsoft 365 licenses in your tenant directly affects your app’s daily limit. For example, an app in a tenant with 5,000–15,000 licenses may have a 24-hour limit of 3.6 million resource units.
📊 SharePoint Graph API Resource Units: What Do Your Calls Cost?
Microsoft has introduced a resource unit model to quantify the cost of different Graph API operations. This helps developers understand how their apps consume quota and why throttling may occur.
Below is a hypothetical breakdown that maps 1.8 million Graph API calls to the number of actual resource units consumed. This illustrates the effective “cost” of different types of operations:
Rate | Description | Percent | Resource Units | Graph Calls |
---|---|---|---|---|
1.0 | File Download | 67.0% | 1,206,000 | 1,800,000 |
2.0 | Multi-item Query (e.g., list children) | 10.0% | 360,000 | |
5.0 | Permissions Operation ($expand=permissions) | 23.0% | 2,070,000 | |
Total | 100.0% | 3,636,000 |
⚠️ Note: This breakdown is illustrative and not based on actual telemetry. It demonstrates how different Graph API operations carry different resource unit weights. For instance, a single permissions-related call may “cost” five times more than a file download. Understanding this cost model is essential for managing your app’s quota effectively.
For more details, see the official documentation on application throttling in SharePoint Online.
📈 Telemetry Analysis: Your Optimization Superpower
To truly optimize your app’s Graph API usage, you need visibility into which operations are being called and how frequently. Most apps today are instrumented with telemetry platforms that can capture this data.
By analyzing telemetry logs:
- Identify high-cost operations (e.g., frequent permission queries).
- Spot patterns in multi-item queries that could be batched or paginated.
- Evaluate whether downloads are being triggered unnecessarily.
This analysis can help you reduce resource unit consumption without sacrificing functionality.
🚀 Bonus Tip: Try SharePoint Service Prioritization
If your app is heavily reliant on SharePoint operations, consider enabling Service Prioritization in SharePoint Online. According to https://learn.microsoft.com/en-us/sharepoint/dev/general-development/service-prioritization-in-sharepoint, this feature can provide 10x more capacity for SharePoint-specific Graph API calls—potentially alleviating throttling issues for high-volume apps.
Have questions or want to share your own optimization strategies? Drop a comment below or reach out!