[AD B2C]: Why are we running into Rate Limitations with minimal number of requests (2-3 requests → login + update + login)

cloudfanatic 161 Reputation points
2022-01-12T17:08:02.577+00:00

Using Azure AD B2C for user management, the users are having limited actions, when i open logs i get this error after 2-3 (2-3 requests → login + update + login)

ERROR:fastapi:{"error":{"code":"Directory_ConcurrencyViolation","message":"Error due to concurrent requests being made to the tenant. Please wait briefly and retry.","innerError":{"date":"2022-01-05T13:21:44","request-id":"","client-request-id":""}}}

After that I did research and read this two docs link1 link2 from where I can see that this applies on a per user and per app and the limit is 10k request in 10 minutes, but actually my application is in development and I have several users (testers and developers) which do not cause that much requests.

Is there a way we can solve this without implementing the Retry-After header?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,639 questions
{count} vote

Accepted answer
  1. AmanpreetSingh-MSFT 56,306 Reputation points
    2022-01-14T18:57:14.277+00:00

    @cloudfanatic • Thank you for providing the required details.

    By tracking the details from the backend for your tenant based on the correlation ID and the timeframe of the error you have provided, I confirmed that there is no throttling issue.
    I can see that the request is being failed with an exception with Result Code: NoSuchAttribute. This indicates that there are multiple patch calls are being made very quickly and not providing enough time for the changes made in previous call(s) to replicate.

    So, to answer your question, you will have to implement the Retry-After header or use an exponential back-off approach to resolve the issue.

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

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

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful