Hi @Yang, George · Thank you for reaching out.
Could you please try updating your code with exponential backoff approach, upon receiving Count of cacheOperations is over the limit
error,
- 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 no longer get the error.
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.
Hi @AmanpreetSingh-MSFT ,
Additional information:
It appears that this error "Count of cacheOperations is over the limit" only happens on the third updating user email operation - the first and the second email change for the same user are fine.
But the B2C Audit log shows a different error - the user update failure with "Microsoft.Online.DirectoryServices.DirectoryOperationDisallowedException".
Included Updated Properties:
"MailNickname, ProxyAddresses, UserPrincipalName"
Why do we see two different error messages? I am more interested to find the cause for "Microsoft.Online.DirectoryServices.DirectoryOperationDisallowedException".
Thanks.
Hi @AmanpreetSingh-MSFT same thing happening for us, do you have more details on why is that happening? Thanks!