Managing 429 Errors in Microsoft Graph API a Practical Guide for Developers

Included here are some practical strategies for managing 429 errors in Microsoft Graph API, including monitoring and analyzing usage, understanding AppResourceUnit throttling, implementing retry logic, and leveraging batching techniques.

Encountering a 429 Too Many Requests error while working with the Microsoft Graph API can be disruptive—especially when building scalable, enterprise-grade solutions. This guide is designed to help developers understand the root causes of these errors and apply proven strategies to mitigate them effectively.

Whether you’re dealing with standard retry throttling or the more nuanced AppResourceUnit (ARU) throttling, this post provides actionable guidance to help you maintain application performance and reliability.


🚦 Understanding 429 Errors

A 429 error indicates that your application is exceeding the allowed request rate. Microsoft Graph enforces throttling to ensure service stability and equitable resource distribution across tenants. When throttling is triggered, the API responds with a 429 status code and typically includes a Retry-After header indicating when it is safe to retry the request.

There are two primary types of 429 errors:

Standard Retry Throttling

This occurs when your app surpasses general request thresholds. The recommended approach is to implement exponential backoff and respect the Retry-After header.

AppResourceUnit (ARU) Throttling

This form of throttling is tied to your tenant’s license-based resource allocation and requires a more strategic approach.


🔧 What Is AppResourceUnit Throttling?

ARU throttling is a resource-based control mechanism used in Microsoft 365 services such as SharePoint Online and Microsoft Graph. It limits API usage based on the number and type of licenses (e.g., E3, E5) assigned to your tenant. See here for more information on AppResourceUnit throttling: Application Throttling

Key Characteristics:

  • Error Codes: 429_AppResourceUnit, 429_AppResourceUnitDaily
  • Quota Enforcement: Determined by license count and not adjustable via support or licensing changes.
  • Common Triggers:
    • High-volume operations (e.g., scanning millions of files)
    • Exceeding tenant-wide resource unit quotas

This mechanism is intentionally designed to promote fair usage and maintain service integrity across all tenants.

📊 Monitor and Analyze Usage

Track Tenant-Wide Graph API Usage by Application

To effectively manage and prevent 429 errors, it’s essential to identify which applications in your tenant are consuming the most Microsoft Graph API resources. The most straightforward approach is to leverage the getApiUsage endpoint from the beta version of the Graph Reports API, which provides detailed usage metrics by application:

GET /reports/getApiUsage(period={period_value},serviceArea={service_area},appId={appId})

Key Benefits:

  • Application-Level Visibility: See exactly which apps are making the most API calls
  • Time-Based Analysis: Track usage patterns over different time periods (D7, D30, D60)
  • Request Volume Metrics: Monitor total request counts and identify high-volume consumers
  • Proactive Planning: Identify applications that might be approaching throttling limits

Available Time Periods:

  • D7 - Last 7 days
  • D30 - Last 30 days
  • D60 - Last 60 days

Response Data Includes:

  • Application ID
  • Total request count by application
  • Service area (Always returns ‘Microsoft Exchange’. May be subject to change since this is a beta endpoint)

Required Permissions:

  • Reports.Read.All

Required User Roles

  • Global Reader
  • Global Administrator

This data is invaluable for:

  • Capacity Planning: Understanding which applications and endpoints drive the highest API usage
  • Troubleshooting: Quickly identifying the source of unexpected throttling events by analyzing endpoint usage patterns

See this post for a practical example of how to generate a report showing the API usage by application using PowerShell and Excel: Tracking Microsoft Graph API Usage with PowerShell.

See here for more information on throttling limits: Microsoft Graph service-specific Graph API throttling limits.

To ensure your applications remain resilient and performant, consider the following best practices:

✅ Implement Retry Logic

Always honor the Retry-After header and use exponential backoff to avoid overwhelming the service.

📦 Use Request Batching

Batching reduces the number of individual HTTP requests by combining them into a single /v1.0/$batch call. This significantly lowers the request volume and helps stay within rate limits.

📘 Learn more: https://learn.microsoft.com/graph/json-batching

⏳ Distribute Load Strategically

Avoid sending large volumes of requests in short bursts. Instead, spread API calls over time or across multiple applications to balance the load.

📁 Use optimizations for OneDrive Scanning

Uses best practices when scanning OneDrive content to minimize API calls and reduce throttling risk. Here are some specific strategies: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/concepts/scan-guidance This includes using delta queries to detect changes incrementally rather than performing full scans. This approach significantly reduces the number of API calls and improves efficiency.

📘 Learn more: https://learn.microsoft.com/onedrive/developer/rest-api/concepts/scan-guidance and https://learn.microsoft.com/onedrive/developer/rest-api/concepts/delta-query-onedrive

🥇 Leverage Service Prioritization for SharePoint

If your application interacts with SharePoint data, enabling Service Prioritization can provide substantial benefits:

Advantages of Service Prioritization:

  • Reduced Throttling Risk: Prioritized applications are the last to be throttled during high-demand periods.
  • Increased Resource Limits: These apps can scale their usage up to 10x the standard limits when additional capacity is available.
  • Dedicated Resource Units: Prioritized apps receive isolated resource units, ensuring consistent performance regardless of other tenant activity.
  • Enhanced Support for High-Volume Operations: Ideal for scenarios such as compliance scans, content discovery, or data migration.
  • No Code Changes Required: Once configured, prioritization benefits apply automatically.

📘 Learn more: https://learn.microsoft.com/en-us/sharepoint/sharepoint-prioritization


🚀 Consider Microsoft Graph Data Connect for Large-Scale Operations

For scenarios involving bulk data extraction—such as analytics, compliance, or reporting—consider using Microsoft Graph Data Connect. It is optimized for large-scale operations and is not subject to the same throttling constraints as REST APIs.

📘 Learn more:


🧭 Additional Considerations

  • Microsoft actively monitors and categorizes throttling events to improve service reliability.
  • Throttling can have cascading effects across applications, even when the root cause is isolated.

💬 Conclusion

Throttling is a fundamental aspect of working with cloud APIs, but it doesn’t have to hinder your development efforts. By understanding the different types of 429 errors and applying these best practices, you can build robust, scalable applications that operate efficiently within Microsoft Graph’s service boundaries.

If you’re interested in reviewing your tenant’s current API usage or exploring architectural strategies to reduce throttling risk, feel free to reach out.

Built with Hugo
Theme Stack designed by Jimmy