Skip to content

fix: set MaxRetryDelay to honour Graph API Retry-After up to 315s#119

Open
Jeenil wants to merge 1 commit into
microsoft:mainfrom
Jeenil:fix-max-retry-delay
Open

fix: set MaxRetryDelay to honour Graph API Retry-After up to 315s#119
Jeenil wants to merge 1 commit into
microsoft:mainfrom
Jeenil:fix-max-retry-delay

Conversation

@Jeenil
Copy link
Copy Markdown

@Jeenil Jeenil commented May 27, 2026

Summary

Fixes #118.

The azure-sdk retry policy correctly reads the Retry-After header but caps the wait at MaxRetryDelay, which defaults to 60 s. The Graph API Identity Governance endpoint returns Retry-After values up to 315 s, causing the SDK to retry too early, re-hit 429, and exhaust retries before the throttle window clears.

Setting MaxRetryDelay: 600 * time.Second in both NewRetryOptionsForReadAfterCreate and NewRetryOptions ensures the full Retry-After duration is respected.

Changes

  • internal/clients/options.go: added MaxRetryDelay: 600 * time.Second to both NewRetryOptionsForReadAfterCreate and NewRetryOptions.

Note to maintainers

I apologies the original issue title ("Retry-After not honoured") was misleading. The real problem is the missing MaxRetryDelay cap. I've updated the issue body with the corrected root cause.

I'm relatively new to contributing to this provider and happy to revise the approach if the 600 s value or placement isn't right. Please let me know if you'd prefer a different cap, a configurable option, or if this belongs somewhere else in the retry pipeline. Thank you for reviewing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

data.msgraph_resource fails immediately on 429. Retry

1 participant