onenote resource type

The entry point for OneNote resources.

All calls to the OneNote service through the Microsoft Graph API use this service root URL:

https://graph.microsoft.com/{version}/{location}/onenote/ 

The location can be user notebooks on Office 365 or consumer OneDrive, and group notebooks on Office 365. SharePoint site-hosted notebooks is currently not supported.

User notebooks To access personal notebooks on consumer OneDrive or OneDrive for Business, use one of the following URLs:

https://graph.microsoft.com/{version}/me/onenote/{notebooks | sections | sectionGroups | pages} 
https://graph.microsoft.com/{version}/users/{userPrincipalName}/onenote/{notebooks | sections | sectionGroups | pages} 
https://graph.microsoft.com/{version}/users/{id}/onenote/{notebooks | sections | sectionGroups | pages} 

Group notebooks To access notebooks that are owned by a group, use the following service root URL:

https://graph.microsoft.com/{version}/groups/{id}/onenote/{notebooks | sections | sectionGroups | pages} 

The following permission scopes provide levels of access to OneNote notebooks. Choosing permission scopes depends both on the location of the notebooks you're targeting and your app's functionality.

Scopes for personal notebooks in consumer OneDrive or OneDrive for Business that are owned by the current user

Scope Permission in Azure portal Description
Notes.Create Create users' OneNote notebooks Can view the titles of your OneNote notebooks and sections; create new notebooks, sections and pages.
Notes.Read Read users' OneNote notebooks Can read your OneNote notebooks.
Notes.ReadWrite Read and write users' OneNote notebooks Can read, share and modify your OneNote notebooks.

Scopes for personal notebooks shared by other users and group notebooks that the current user can access

Scope Permission in Azure portal Description
Notes.Read.All Read all OneNote notebooks that the user can access Can read all the OneNote notebooks that the signed-in user has access to.
Notes.ReadWrite.All Read and write all OneNote notebooks that the user can access Can read, share and modify all the OneNote notebooks that the signed-in user has access to.

Note: Accessing SharePoint site notebooks through the Graph API is currently not supported.

Relationships

Relationship Type Description
notebooks Notebook collection The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable.
operations Operation collection The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable.
pages Page collection The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.
resources Resource collection The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable.
sectionGroups SectionGroup collection The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.
sections Section collection The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Methods

Method Return Type Description
Create notebook Notebook Create a notebook by posting to the notebooks collection.
List notebooks Notebook collection Get a collection of notebooks.
Create page Page Create a page by posting to the pages collection.
List pages Page collection Get a collection of pages.
List section groups SectionGroup collection Get a collection of section groups.
List sections Section collection Get a collection of sections.