I want to acces onenote on sharepoint in graphapi, but get error

De Baerdemaeker Myles 20 Reputation points
2025-08-26T09:32:41.4533333+00:00

Hi,

I follow this link https://free.blessedness.top/en-us/graph/api/resources/onenote-api-overview?view=graph-rest-1.0 to access sharepoint site notebook. But I get the following

{
    "error": {
        "code": "20143",
        "message": "The OData query is invalid. The URI segment 'sections' is invalid after the segment 'notes'.",
        "innerError": {
            "date": "2025-08-26T09:25:47",
            "request-id": ,
            "client-request-id":
        }
    }
}
Developer technologies | .NET | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 810 Reputation points Microsoft External Staff
    2025-08-26T11:01:57.0733333+00:00

    The error occurs because the request URI is not valid for accessing OneNote notebooks stored in SharePoint. The sections segment cannot directly follow the SharePoint site notebook URL. Instead, you need to use the correct Microsoft Graph API path for OneNote resources.

     1. You replace {site-id}, {notebook-id}, {section-id} with actual values.

    1. The app has OneNote.Read.All or Sites.Read.All Graph API permissions.
    2. You are using the v1.0 endpoint (https://graph.microsoft.com/v1.0/...) instead of an invalid OData-style query.

     


0 additional answers

Sort by: Most helpful

Your answer

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