Microsoft

Microsoft Graph: OneNote

Create and read OneNote notebooks, section groups, sections and pages, and copy pages and sections. This listing is one area of Microsoft Graph, the single…

Productivity & workspace#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Create and read OneNote notebooks, section groups, sections and pages, and copy pages and sections.

This listing is one area of Microsoft Graph, the single REST API for Microsoft 365, Outlook, OneDrive, Teams and Microsoft Entra ID. It holds 100 of the area's requests, the most direct ones first, generated from Microsoft's own OpenAPI description of Graph v1.0. The other areas (mail, calendar, files, Teams, users and more) are listed separately on the Microsoft page.

Get an access token

  1. Sign in to the Microsoft Entra admin center and open App registrations > New registration. For a quick test, the Graph Explorer signs you in and shows a token without registering anything.
  2. Under API permissions, add the Microsoft Graph permissions this area needs, for example: Notes.Read, Notes.ReadWrite, Notes.Create. Delegated permissions act as the signed-in user; application permissions act as the app itself and need an administrator's consent.
  3. Under Certificates & secrets, create a client secret (keep it out of shared collections).
  4. Get a token from https://login.microsoftonline.com/ /oauth2/v2.0/token: the authorization-code flow for a user, or grant_type=client_credentials with scope=https://graph.microsoft.com/.default for an app. Send it as Authorization: Bearer .

Using these requests

  • Base URL: https://graph.microsoft.com/v1.0. /me/... paths act on the signed-in user; with an application token use /users/{id or userPrincipalName}/... instead.
  • Shape responses with OData query parameters: $select (fields), $filter, $orderby, $top, $expand and $search (some need the ConsistencyLevel: eventual header). Long lists are paged: follow @odata.nextLink.
  • Combine up to 20 requests in one call with POST /$batch.

Common errors

StatusCodeWhat to do
401InvalidAuthenticationTokenThe token is missing, expired or for another resource: get a new one for https://graph.microsoft.com.
403Authorization_RequestDenied / ErrorAccessDeniedAdd the permission listed in the request's docs and grant consent.
404ResourceNotFound / itemNotFoundCheck the id; ids from another user or tenant are not found.
429TooManyRequestsThrottled: wait the Retry-After seconds, then retry.

Docs: OneNote overview · Permissions reference · Throttling

Endpoints 100

Onenote

  • GETGet onenote/me/onenote
  • DELETEDelete onenote/me/onenote
  • PATCHUpdate onenote/me/onenote

Onenote: pages

  • GETList pages/me/onenote/pagesRetrieve a list of page objects.
  • POSTCreate page/me/onenote/pagesCreate a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the…
  • GETGet page/me/onenote/pages/:onenotePage-idRetrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can…
  • DELETEDelete page/me/onenote/pages/:onenotePage-idDelete a OneNote page.
  • PATCHUpdate page/me/onenote/pages/:onenotePage-id
  • GETDownload page content/me/onenote/pages/:onenotePage-id/contentThe page's HTML content.
  • PUTUpload page content/me/onenote/pages/:onenotePage-id/contentUpdate the content of a OneNote page.
  • DELETEUpload page content/me/onenote/pages/:onenotePage-id/contentThe page's HTML content.
  • GETPreview page/me/onenote/pages/:onenotePage-id/preview()
  • POSTCopy to section (page)/me/onenote/pages/:onenotePage-id/copyToSectionCopy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation…
  • GETGet parent section/me/onenote/pages/:onenotePage-id/parentSectionThe section that contains the page. Read-only.
  • GETGet parent notebook/me/onenote/pages/:onenotePage-id/parentNotebookThe notebook that contains the page. Read-only.
  • POSTCreate onenote patch content/me/onenote/pages/:onenotePage-id/onenotePatchContent

Onenote: sections

  • GETList sections/me/onenote/sectionsRetrieve a list of onenoteSection objects.
  • POSTCreate section/me/onenote/sections
  • GETGet section/me/onenote/sections/:onenoteSection-idRetrieve the properties and relationships of a onenoteSection object.
  • DELETEDelete section/me/onenote/sections/:onenoteSection-id
  • PATCHUpdate section/me/onenote/sections/:onenoteSection-id
  • GETList pages/me/onenote/sections/:onenoteSection-id/pagesRetrieve a list of page objects from the specified section.
  • POSTCreate page/me/onenote/sections/:onenoteSection-id/pagesCreate a new page in the specified section.
  • POSTCopy to notebook (section)/me/onenote/sections/:onenoteSection-id/copyToNotebookFor Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.
  • GETGet parent notebook/me/onenote/sections/:onenoteSection-id/parentNotebookThe notebook that contains the section. Read-only.
  • POSTCopy to section group (section)/me/onenote/sections/:onenoteSection-id/copyToSectionGroupFor Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.
  • GETGet parent section group/me/onenote/sections/:onenoteSection-id/parentSectionGroupThe section group that contains the section. Read-only.
  • GETGet page/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-idThe collection of pages in the section. Read-only. Nullable.
  • DELETEDelete page/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id
  • PATCHUpdate page/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id
  • GETDownload page content/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id/contentThe page's HTML content.
  • PUTUpload page content/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id/contentThe page's HTML content.
  • DELETEUpload page content/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id/contentThe page's HTML content.
  • GETPreview page/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id/preview()
  • POSTCopy to section (page)/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id/copyToSectionCopy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation…
  • GETGet parent section/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id/parentSectionThe section that contains the page. Read-only.
  • GETGet parent notebook/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id/parentNotebookThe notebook that contains the page. Read-only.
  • POSTCreate onenote patch content/me/onenote/sections/:onenoteSection-id/pages/:onenotePage-id/onenotePatchContent

Onenote: notebooks

  • GETList notebooks/me/onenote/notebooksRetrieve a list of notebook objects.
  • POSTCreate notebook/me/onenote/notebooksCreate a new OneNote notebook.
  • POSTGet notebook from web url (notebook)/me/onenote/notebooks/getNotebookFromWebUrlRetrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or…
  • GETGet notebook/me/onenote/notebooks/:notebook-idRetrieve the properties and relationships of a notebook object.
  • DELETEDelete notebook/me/onenote/notebooks/:notebook-id
  • PATCHUpdate notebook/me/onenote/notebooks/:notebook-id
  • GETGet recent notebooks (notebook)/me/onenote/notebooks/getRecentNotebooks(includePersonalNotebooks=:includePersonalNotebooks)Get a list of recentNotebook instances that have been accessed by the signed-in user.
  • GETList sections/me/onenote/notebooks/:notebook-id/sectionsRetrieve a list of onenoteSection objects from the specified notebook.
  • POSTCreate section/me/onenote/notebooks/:notebook-id/sectionsCreate a new onenoteSection in the specified notebook.
  • POSTCopy notebook (notebook)/me/onenote/notebooks/:notebook-id/copyNotebookFor Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.
  • GETList section groups/me/onenote/notebooks/:notebook-id/sectionGroupsRetrieve a list of section groups from the specified notebook.
  • POSTCreate section group/me/onenote/notebooks/:notebook-id/sectionGroupsCreate a new section group in the specified notebook.
  • GETGet section/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-idThe sections in the notebook. Read-only. Nullable.
  • DELETEDelete section/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-id
  • PATCHUpdate section/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-id
  • GETGet section group/me/onenote/notebooks/:notebook-id/sectionGroups/:sectionGroup-idThe section groups in the notebook. Read-only. Nullable.
  • DELETEDelete section group/me/onenote/notebooks/:notebook-id/sectionGroups/:sectionGroup-id
  • PATCHUpdate section group/me/onenote/notebooks/:notebook-id/sectionGroups/:sectionGroup-id
  • GETList pages/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-id/pagesThe collection of pages in the section. Read-only. Nullable.
  • POSTCreate page/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-id/pages
  • GETList sections/me/onenote/notebooks/:notebook-id/sectionGroups/:sectionGroup-id/sectionsThe sections in the section group. Read-only. Nullable.
  • POSTCreate section/me/onenote/notebooks/:notebook-id/sectionGroups/:sectionGroup-id/sections
  • POSTCopy to notebook (section)/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-id/copyToNotebookFor Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.
  • GETGet parent notebook/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-id/parentNotebookThe notebook that contains the section. Read-only.
  • GETList section groups/me/onenote/notebooks/:notebook-id/sectionGroups/:sectionGroup-id/sectionGroupsThe section groups in the section. Read-only. Nullable.
  • GETGet parent notebook/me/onenote/notebooks/:notebook-id/sectionGroups/:sectionGroup-id/parentNotebookThe notebook that contains the section group. Read-only.
  • POSTCopy to section group (section)/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-id/copyToSectionGroupFor Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.
  • GETGet parent section group/me/onenote/notebooks/:notebook-id/sections/:onenoteSection-id/parentSectionGroupThe section group that contains the section. Read-only.
  • GETGet parent section group/me/onenote/notebooks/:notebook-id/sectionGroups/:sectionGroup-id/parentSectionGroupThe section group that contains the section group. Read-only.

Onenote: resources

  • GETList resources/me/onenote/resourcesThe image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific…
  • POSTCreate resource/me/onenote/resources
  • GETGet resource/me/onenote/resources/:onenoteResource-idThe image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific…
  • DELETEDelete resource/me/onenote/resources/:onenoteResource-id
  • PATCHUpdate resource/me/onenote/resources/:onenoteResource-id
  • GETDownload resource content/me/onenote/resources/:onenoteResource-id/contentRetrieve the binary data of a file or image resource object.
  • PUTUpload resource content/me/onenote/resources/:onenoteResource-id/contentThe content stream
  • DELETEUpload resource content/me/onenote/resources/:onenoteResource-id/contentThe content stream

Onenote: operations

  • GETList operations/me/onenote/operationsGet the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as…
  • POSTCreate operation/me/onenote/operations
  • GETGet operation/me/onenote/operations/:onenoteOperation-idGet the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as…
  • DELETEDelete operation/me/onenote/operations/:onenoteOperation-id
  • PATCHUpdate operation/me/onenote/operations/:onenoteOperation-id

Onenote: section groups

  • GETList section groups/me/onenote/sectionGroupsRetrieve a list of sectionGroup objects.
  • POSTCreate section group/me/onenote/sectionGroups
  • GETGet section group/me/onenote/sectionGroups/:sectionGroup-idRetrieve the properties and relationships of a sectionGroup object.
  • DELETEDelete section group/me/onenote/sectionGroups/:sectionGroup-id
  • PATCHUpdate section group/me/onenote/sectionGroups/:sectionGroup-id
  • GETList sections/me/onenote/sectionGroups/:sectionGroup-id/sectionsRetrieve a list of onenoteSection objects from the specified section group.
  • POSTCreate section/me/onenote/sectionGroups/:sectionGroup-id/sectionsCreate a new onenoteSection in the specified section group.
  • GETList section groups/me/onenote/sectionGroups/:sectionGroup-id/sectionGroupsRetrieve a list of section groups from the specified section group.
  • GETGet parent notebook/me/onenote/sectionGroups/:sectionGroup-id/parentNotebookThe notebook that contains the section group. Read-only.
  • GETGet parent section group/me/onenote/sectionGroups/:sectionGroup-id/parentSectionGroupThe section group that contains the section group. Read-only.
  • GETGet section/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-idThe sections in the section group. Read-only. Nullable.
  • DELETEDelete section/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-id
  • PATCHUpdate section/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-id
  • GETGet section group/me/onenote/sectionGroups/:sectionGroup-id/sectionGroups/:sectionGroup-id1The section groups in the section. Read-only. Nullable.
  • GETList pages/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-id/pagesThe collection of pages in the section. Read-only. Nullable.
  • POSTCreate page/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-id/pages
  • POSTCopy to notebook (section)/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-id/copyToNotebookFor Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.
  • GETGet parent notebook/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-id/parentNotebookThe notebook that contains the section. Read-only.
  • POSTCopy to section group (section)/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-id/copyToSectionGroupFor Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.
  • GETGet parent section group/me/onenote/sectionGroups/:sectionGroup-id/sections/:onenoteSection-id/parentSectionGroupThe section group that contains the section. Read-only.

API details

Base URL
https://graph.microsoft.com/v1.0
Authentication
OAuth 2.0 (authorization code, client credentials flows)
Operations
100 operations on 59 pathsGET 47POST 25DELETE 14PATCH 11PUT 3
Main resources
Onenote: notebooks 29Onenote: sections 22Onenote: section groups 20Onenote: pages 13Onenote: resources 8Onenote: operations 5Onenote 3
Description format
OpenAPI 3.0.4, API version v1.0

How to test the Microsoft Graph: OneNote in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Microsoft Graph: OneNote collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code, client credentials flows). Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Get onenote” (GET /me/onenote), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Microsoft Graph: OneNote?

Create and read OneNote notebooks, section groups, sections and pages, and copy pages and sections. This listing is one area of Microsoft Graph, the single… It is listed under Productivity & workspace and has 100 endpoints.

Who publishes the Microsoft Graph: OneNote?

It is listed from Microsoft's public API description (an OpenAPI document), not published by Microsoft on Swastik Codes. Anyone who controls microsoft.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Microsoft Graph: OneNote?

Requests go to https://graph.microsoft.com/v1.0. Endpoint paths are added to this base URL.

How do I authenticate with the Microsoft Graph: OneNote?

With OAuth 2.0 (authorization code, client credentials flows).

How many endpoints does the Microsoft Graph: OneNote have?

100 operations on 59 paths (47 GET, 25 POST, 14 DELETE, 11 PATCH, 3 PUT). The largest groups are Onenote: notebooks, Onenote: sections, Onenote: section groups, Onenote: pages.

Is forking the Microsoft Graph: OneNote free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.