Hi @Marco Dissel
This looks like a threshold exception caused by the amount of data returned being too large.
One possible way to tweak the API request to bypass the threshold problem is to use the $top query parameter to specify the maximum number of items to return per page. For example, you can use something like this:
This will return only the first 100 items in the root folder, along with a
nextLink property that contains the URL to get the next page of items. You can then use the
nextLink URL to get the next 100 items, and so on, until you get all the items in the folder. This way, you can avoid getting a large number of items in one request, which can trigger the threshold exception.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.