Share via

Getting 429 exception while adding subscription to an Enrollment number

Anonymous
2022-03-04T07:47:42.233+00:00

Getting 429 exception while adding subscription to an Enrollment number. Can you suggest the reason behind this or any workaround!

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

1 answer

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,971 Reputation points Moderator
    2022-03-04T10:30:55.54+00:00

    Hi @Anonymous • Thank you for reaching out.

    The HTTP 429 error occurs when there are too many requests being sent to a service from an application/API and the service cannot handle the requests beyond the threshold. The service then responds with HTTP error code 429.

    To resolve the issue, on HTTP error code 429, begin throttling your client app/api using an exponential backoff approach:

    Retry =  
    {  
        Delay= TimeSpan.FromSeconds(2),  
        MaxDelay = TimeSpan.FromSeconds(16),  
        MaxRetries = 5,  
        Mode = RetryMode.Exponential  
     }  
    

    Once you implement exponential backoff approach, the behavior will be:

    • Wait 1 second, retry request
    • If still throttled wait 2 seconds, retry request
    • If still throttled wait 4 seconds, retry request
    • If still throttled wait 8 seconds, retry request
    • If still throttled wait 16 seconds, retry request
    • At this point, you should not be getting HTTP 429 response codes.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.