OneDrive for Business 504 error listing drive items

Juanjo 1 Reputation point

Hello, one customer is using our application to list some OneDrive folders content, but some specific OneDrive folders content (children) can not be listed. The OneDrive server replies with 504 error.

We are using this REST API to list the OneDrive folder items:

With "expand=thumbnails" paramter.

The rest of the same user folders can be readed correctly, only some specific folder can not be read due this error.

15 days ago all the folders could be read correctly (using the same application).

What could be the reason?


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,380 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,800 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,711 Reputation points Microsoft Vendor

    Hi @Juanjo ,

    As per documentation 504 - Gateway Timeout: The server, while acting as a proxy, did not receive a timely response from the upstream server it needed to access in attempting to complete the request.

    504 Gateway Timeout generally happens when you try to retrieve large amounts of data in single API call and request gets timed out at the server side before sending the response.

    Try to limit the amount of data retrieved from Microsoft Graph GET /drives/{drive-id}/root:/{path-relative-to-root}:/children?$expand=thumbnails by using $top and $select to improve the performance of your Graph API call.

    Additional references:

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments