List pages returning 504 for a section with a lot of notes

Alexandre Ferreira 20 Reputation points
2024-11-27T14:25:09.49+00:00

Hello, I’m experiencing an issue while querying a notebook containing a large number of notes. Despite specifying top=10, the query consistently returns a 504 Gateway Timeout error.

url: https://graph.microsoft.com/v1.0/users/{USER_ID}/onenote/sections/{NOTEBOOK_ID}/pages?$select=self,lastModifiedDateTime&$top=10

Error: {"error":{"code":"UnknownError","message":"","innerError":{"date":"2024-11-27T14:21:33","request-id":"41a2fe26-c259-4c59-921b-29e4c5669a69","client-request-id":"41a2fe26-c259-4c59-921b-29e4c5669a69"}}}

OneNote
OneNote
A family of Microsoft products that enable users to capture, organize, and reuse notes electronically.
219 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,663 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 43,956 Reputation points
    2024-11-28T10:44:22.69+00:00

    Hi @Alexandre Ferreira

    I just tested this endpoint locally and it works fine for me.

    User's image

    A 504 error usually means that the proxy server was unable to receive a timely response from the upstream server it needed to access. There is no standard solution for this, I would suggest retrying the request after waiting for a while. Sometimes, a 504 error is temporary and can be resolved by resubmitting the request.

    If the above suggestions do not work, please open a support ticket with the Microsoft support team to get help from the API owner.


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.