See the logs, they're pretty descriptive! I've bolded the header.
Retry-After returns a value of 0, where an amount of milliseconds is expected. I'm currently falling back on exponential back-off, which is far from ideal in this case. The documentation and best practices instruct to fallback on exp. back-off when no Retry-After header is returned, but it is. And after 5 retries (my retry policy), I throw the exception, which shows that Microsoft Graph in fact expects me to wait 3 minutes. Can anyone confirm this is a bug, or am I doing something wrong after all?
Logs:
[Information] [RETRY] Date: Thu, 28 Oct 2021 11:55:37 GMTCache-Control: no-cacheTransfer-Encoding: chunkedRetry-After: 0Strict-Transport-Security: max-age=31536000request-id: 19c11610-2b14-4c82-abdd-ce9582eb1fe7client-request-id: 19c11610-2b14-4c82-abdd-ce9582eb1fe7x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"004","RoleInstance":"AM2PEPF000050C2"}} 2021-10-28T11:55:38.492 [Information] [RETRY] StatusCode: 429, ReasonPhrase: 'Too Many Requests', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:{Date: Thu, 28 Oct 2021 11:55:37 GMTCache-Control: no-cacheTransfer-Encoding: chunkedRetry-After: 0Strict-Transport-Security: max-age=31536000request-id: 19c11610-2b14-4c82-abdd-ce9582eb1fe7client-request-id: 19c11610-2b14-4c82-abdd-ce9582eb1fe7x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"004","RoleInstance":"AM2PEPF000050C2"}}Content-Type: application/json}
[Information] [RETRY] Retry-After provided in retry policy.
[Information] 0
[Information] [RETRY] Using Retry-After header for delay: 00:00:00
[Warning] [RETRY] Delaying for 0ms, then making retry 5.
[Error] [2219ab8a36038d2e] [3DDEDC39FE1ABC9D6C328F98503B08FB3FBEB35A223A91D424] Response status code does not indicate success: 429 (Too Many Requests).
[Warning] 429: Too many requests. Retrying after delay.
2021-10-28T11:55:38.524 [Error] Operation: Update; Exception: [Status Code: 429; Reason: Resource 'OData_GetSubscription__UserMailbox_0003bffd-18fb-b0eb-0000-000000000000_00000000-0000-0000-0000-000000000000' has reached limit of '250'. Please retry after '10/28/2021 11:58:13 AM']