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 Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
351 questions
Microsoft Graph Site Lists API
Microsoft Graph Site Lists API
A Microsoft API that "supports access to SharePoint sites, lists, and drives; read-only support for site resources; read-write support for lists, listItems, and driveItems; and address resources by SharePoint ID, URL, or relative path.
326 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.
1,975 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,461 Reputation points

    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