We are now able to reproduce this with the following step below: (we used direct Outlook Mail API to reproduce it)
Get number of items in the Inbox
Get subfolders of the Inbox
Read first 10 e-mails sorted by ‘received date’
For each email, move the e-mail to the ‘processedbox’ (which is a subfolder of the Inbox).
At exactly 500 ‘move’ actions we see the following behavior of the API:
After 500 move actions:
message=The move or copy operation failed.
The next ‘move’-action
message=Too many concurrent connections opened., The process failed to get the correct properties.
Important to mention here is that the other 3 request (Get number of items, get subfolders and read first 10 e-mails) are still working after this and return the correct data. Only on the move action we receive an error 429.
We tried several mailboxes (shared and user mailboxes), same issue.
It’s not the ‘Rate Limit’-throttling, because the header returns the information below and there are still remaining requests, when the error 500 occurs:
We currently cannot find any Throttling documentation related to the 500 move actions.
We sometimes have to wait for more than 30 minutes before the 429 error disappears.
Is this a bug in the API? Or a throttling rule/issue?
Yes, 429 is the HTTP error code "Too Many Requests - The user has sent too many requests in a given amount of time ("rate limiting")." The HTTP specification doesn't specify how the server identifies the user, nor how it counts requests, so the implementation might hit a limit earlier than you would otherwise expect.
We don't have access to the details of the implementation, and it might change from time to time, so depending on how it is implemented you might also get a 500 thrown from time to time as well. I am not surprised that you are getting rate throttling even though the headers claim you have a few requests to spare, but I agree that the very precise Rate-Limit-Remaining header is unhelpful if it is not accurate, and worth raising as an issue.