0
votes

I am trying to sync oneDrive Files (metadata and permissions) for a domain using MSGraph API using list, children and permission endpoints. I am using batching for children and permission endpoints, sending 10-20 request urls in single batch requests concurrently for 10 users.

I am getting a lot of 429 errors by doing so. Though, I was also getting 429 errors on making single (non-batched) calls also.

According to the documentation related to throttling, they ask to 1. Reduce the number of operations per request 2. Reduce the frequency of calls.

So, my question is

Does a batch call of 10 get urls, count as 10 different operations and 10 different calls ?

2

2 Answers

0
votes

Does a batch call of 10 get urls, count as 10 different operations and 10 different calls ?

Normally, N URLs will be treated as N+1 operations(even more). N operations from the batch URLs and one for the batch URL itself.

Pay attention to the docs:

JSON batching allows you to optimize your application by combining multiple requests into a single JSON object.

Due to multiple requests have been combined to one request, the server side just need to send back one response too. But the underlying operation for each URL still need to be handle, so the workload on server side is still very high, just may reduce a little.

0
votes

The answer lies somewhere in between.

Even though the documentation (cannot find the actual page at this moment) says you can combine up to 20 requests, I found out by experimenting that the limit is currently set to 15. So if you reduce the amount off calls in a single batch you should be good to go.

I'm not sure but it might also help to restrict the batches to a single user.

The throttling limit is set to 10000 items per 10 minutes per user resource, see this blog item