Office 365 Classroom Notebook



Collaborate for free with online versions of Microsoft Word, PowerPoint, Excel, and OneNote. Save documents, spreadsheets, and presentations online, in OneDrive. Share them with others and work together at the same time.

Office 365 has many features. Available now - Outlook, Calendar, OneDrive, Office Online, Skype for Business, SharePoint, Forms Guide 7 – Class Notebook 1. Notebook Structure 2. Creating Class Notebooks 3. Adding/removing sections 4. Adding/removing pupils and teachers 5. Classroom Tips 6. Managing Class Notebooks 7. Get students working in OneNote! Class Notebooks in OneNote for Windows 10 is powerful tool for educators and a great way to share your coursenotes with stu.

-->

Applies to: Enterprise notebooks on Office 365

Schools, colleges, and universities worldwide use class notebooks to help promote productivity, engagement, and collaboration. You can use class notebooks for every class, project, term, and assignment.

You can use the classNotebooks endpoint to perform common tasks for class notebooks, such as creating class notebooks and adding or removing students.

The Class Notebook in the General channel is the central location for viewing and interacting with the Content Library, Collaboration Space, and each student's private space. Navigate to the General channel under the desired classroom, then select the Class Notebook tab. Office 2019 perpetual — Office 2019 purchases currently unlock local notebook support for OneNote. The OneNote desktop app is installed by default alongside Word, PowerPoint, and Excel for Microsoft 365 subscriptions that include the client apps and Office 2019.

Note

The OneNote API provides the classNotebooks endpoint for operations that are specific to class notebooks.

Construct the request URI

  1. To construct the request URI, start with the service root URL for your platform:

    Notebooks on OneDrive for Business

    https://www.onenote.com/api/v1.0/me/notes/

    https://www.onenote.com/api/v1.0/users/{id}/notes/

    SharePoint site notebooks

    https://www.onenote.com/api/v1.0/myOrganization/siteCollections/{id}/sites/{id}/notes/

    Unified group notebooks

    https://www.onenote.com/api/v1.0/myOrganization/groups/{id}/notes/

  1. Append the classNotebooks endpoint, followed a resource path, as needed:

    ../classNotebooks[?omkt,sendemail]

    ../classNotebooks/{notebook-id}

    ../classNotebooks

    ../classNotebooks/{notebook-id}

    ../classNotebooks/{notebook-id}

    ../classNotebooks/{notebook-id}/students

    ../classNotebooks/{notebook-id}/teachers

    ../classNotebooks/{notebook-id}/students/{student-id}

    ../classNotebooks/{notebook-id}/teachers/{teacher-id}

    ../classNotebooks/{notebook-id}/copySectionsToContentLibrary

Your full request URI will look something like these examples:

https://www.onenote.com/api/v1.0/me/notes/classNotebooks/{id}/teachers/{id}

https://www.onenote.com/api/v1.0/users/{id}/notes/classNotebooks/{id}/students

https://www.onenote.com/api/v1.0/myOrganization/siteCollections/{id}/sites/{id}/notes/classNotebooks

https://www.onenote.com/api/v1.0/myOrganization/groups/{id}/notes/classNotebooks/{id}

https://www.onenote.com/api/v1.0/me/notes/classNotebooks/{id}/copySectionsToContentLibrary

Create class notebooks

To create a class notebook, send a POST request to the classNotebooks endpoint.

POST ../classNotebooks[?omkt,sendemail]

In the message body, send a JSON object with the class notebook creation parameters.

ParameterDescription
nameThe name of the notebook.
studentSectionsAn array containing one or more section names. These sections are created in each student's section group.
teachersAn array containing one or more principal objects.
studentsAn array containing one or more principal objects. A section group is created for each student.
hasTeacherOnlySectionGrouptrue to create a Teacher Only section group that's visible to teachers only.
omktURL query parameter that specifies the language for the notebook. Default is en-us. Example: ?omkt=es-es
sendemailURL query parameter that specifies whether to send an email notification when the notebook is created to the teachers and students assigned to the notebook. Default is false.

Teachers and students are represented by principal objects, which contain the following properties:

ParameterDescription
idThe Office 365 user principal name.
See the Azure AD Graph API documentation to learn more about users and groups.
principalTypePerson or Group

Supported languages

You can use the omkt={language-code} URL query parameter to create a class notebook in a specific language. For example:

POST ../classNotebooks?omkt=de-de

The following language codes are supported. The default is en-us.

CodeLanguage
bg-bgБългарски (България)
cs-czČeština (Česká republika)
da-dkDansk (Danmark)
de-deDeutsch (Deutschland)
el-grΕλληνικά (Ελλάδα)
en-usEnglish (United States)
es-esEspañol (España)
et-eeEesti (Eesti)
fi-fiSuomi (Suomi)
fr-frFrançais (France)
hi-inहिंदी (भारत)
hr-hrHrvatski (Hrvatska)
hu-huMagyar (Magyarország)
id-idBahasa Indonesia (Indonesia)
it-itItaliano (Italia)
ja-jp日本語 (日本)
kk-kzҚазақ (Қазақстан)
ko-kr한국어 (대한민국)
lt-ltLietuvių (Lietuva)
lv-lvLatviešu (Latvija)
ms-myBahasa Melayu (Asia Tenggara)
nb-noNorsk (Norge)
nl-nlNederlands (Nederland)
pl-plPolski (Polska)
pt-brPortuguês (Brasil)
pt-ptPortuguês (Portugal)
ro-roRomână (România)
ru-ruРусский (Россия)
sk-skSlovenčina (Slovenská republika)
sl-siSlovenski (Slovenija)
sr-Latn-RSSrpski (Rep. Srbija i Rep. Crna Gora)
sv-seSvenska (Sverige)
th-thไทย (ไทย)
tr-trTürkçe (Türkiye)
uk-uaУкраїнська (Україна)
vi-vnTiếng Việt (Việt Nam)
zh-cn简体中文 (中国)
zh-tw繁體中文 (台灣)

Example

The following request creates a class notebook named Math 101.

This creates a class notebook with four student section groups, each containing a Handouts, Class Notes, Homework, and Quizzes section. The section group created for each student is only accessible by the student and the teacher. It also creates a Teacher Only section group that's only visible to the teacher. The sendemail=true query parameter specifies to send an email notification to the teacher and students when the notebook is created.

Request and response information

The following information applies to POST /classNotebooks requests.

Request dataDescription
ProtocolAll requests use the SSL/TLS HTTPS protocol.
Authorization header

Bearer {token}, where {token} is a valid OAuth 2.0 access token for your registered app.

If missing or invalid, the request fails with a 401 status code. See Authenticate using Azure AD (enterprise apps).

Content-Type headerapplication/json
Accept headerapplication/json
Permission scopeNotes.ReadWrite.CreatedByApp, Notes.ReadWrite, or Notes.ReadWrite.All

Response dataDescription
Success codeA 201 HTTP status code.
Response bodyAn OData representation of the new notebook in JSON format.
In addition to regular notebook properties, class notebooks also have the following properties:
  • studentSections. The student sections in the notebooks.
  • teachers. The teachers that can access the notebook.
  • students. The students that can access the notebook.
  • hasTeacherOnlySectionGroup. true if the notebook contains a Teacher Only section group, otherwise false.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Update class notebooks

To update a class notebook, send a PATCH request to the classNotebooks/{notebook-id} endpoint.

Note

Currently, only the hasTeacherOnlySectionGroup property can be updated in a PATCH request.

PATCH ../classNotebooks/{notebook-id}

In the message body, send a JSON object with the update parameter.

ParameterDescription
hasTeacherOnlySectionGrouptrue to add a Teacher Only section group that's visible to teachers only. false is not supported.

See these methods for other ways to change class notebooks: Add students or teachers, Remove students or teachers, Insert sections.

Example

The following request adds a Teacher Only section group to the specified class notebook.

The new Teacher Only section group is visible to teachers only.

Request and response information

The following information applies to PATCH ../classNotebooks/{notebook-id} requests.

Request dataDescription
ProtocolAll requests use the SSL/TLS HTTPS protocol.
Authorization header

Bearer {token}, where {token} is a valid OAuth 2.0 access token for your registered app.

If missing or invalid, the request fails with a 401 status code. See Authenticate using Azure AD (enterprise apps).

Content-Type headerapplication/json
Accept headerapplication/json
Permission scopeNotes.ReadWrite.CreatedByApp, Notes.ReadWrite, or Notes.ReadWrite.All

Response dataDescription
Success codeA 204 HTTP status code.
ErrorsIf the request fails, the API returns errors in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Get class notebooks

To get one or more class notebooks, send a GET request to the classNotebooks endpoint.

Get one or more class notebooks

GET ../classNotebooks[?filter,orderby,select,top,skip,expand,count]

Get a specific class notebook

GET ../classNotebooks/{notebook-id}[?select,expand]

Notebooks can expand the teachers and students properties. The default sort order is name asc.

Class notebooks are also returned for GET /notebooks requests, but the results won't include any class notebook-specific properties.

Example

Classroom

The following request gets class notebooks that were created since January 1, 2016.

To learn more about getting notebooks, including supported query string options and examples, see Get OneNote content and structure.

Notebook

Request and response information

The following information applies to GET /classNotebooks requests.

Request dataDescription
ProtocolAll requests use the SSL/TLS HTTPS protocol.
Authorization header

Bearer {token}, where {token} is a valid OAuth 2.0 access token for your registered app.

If missing or invalid, the request fails with a 401 status code. See Authenticate using Azure AD (enterprise apps).

Accept headerapplication/json
Permission scopeNotes.Read, Notes.ReadWrite.CreatedByApp, Notes.ReadWrite, or Notes.ReadWrite.All

Response dataDescription
Success codeA 200 HTTP status code.
Response bodyAn OData representation of the class notebooks in JSON format.
In addition to regular notebook properties, class notebooks also have the following properties:
  • studentSections. The student sections in the notebooks.
  • teachers. The teachers that can access the notebook.
  • student. The students that can access the notebook.
  • hasTeacherOnlySectionGroup. true if the notebook contains a Teacher Only section group, otherwise false.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Delete class notebooks

To delete a class notebook, send a DELETE request to the classNotebooks/{notebook-id} endpoint.

DELETE ../classNotebooks/{notebook-id}

Example

The following request deletes the specified class notebook.

Request and response information

The following information applies to DELETE ../classNotebooks/{notebook-id} requests.

Request dataDescription
ProtocolAll requests use the SSL/TLS HTTPS protocol.
Authorization header

Bearer {token}, where {token} is a valid OAuth 2.0 access token for your registered app.

If missing or invalid, the request fails with a 401 status code. See Authenticate using Azure AD (enterprise apps).

Accept headerapplication/json
Permission scopeNotes.ReadWrite.CreatedByApp, Notes.ReadWrite, or Notes.ReadWrite.All

Response dataDescription
Success codeA 204 HTTP status code.
ErrorsIf the request fails, the API returns errors in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Add students and teachers

Adding teachers and students gives them access to the class notebook. Adding a student also creates a student section group. This section group is only accessible by the student and the teacher, and contains the student sections that are defined for the notebook.

To add a student or teacher to a class notebook, send a POST request to the appropriate endpoint.

Add a student

POST ../classNotebooks/{notebook-id}/students

Add a teacher

POST ../classNotebooks/{notebook-id}/teachers

Send a JSON principal object in the message body. You can add one student or one teacher per request.

Teachers and students are represented by principal objects, which contain the following properties:

ParameterDescription
idThe Office 365 user principal name. See the Azure AD Graph API documentation to learn more about users and groups.
principalTypePerson or Group

Example

The following request adds a teacher to the specified class notebook.

Request and response information

The following information applies to POST /students and POST /teachers requests.

Request dataDescription
ProtocolAll requests use the SSL/TLS HTTPS protocol.
Authorization header

Bearer {token}, where {token} is a valid OAuth 2.0 access token for your registered app.

If missing or invalid, the request fails with a 401 status code. See Authenticate using Azure AD (enterprise apps).

Content-Type headerapplication/json
Accept headerapplication/json
Permission scopeNotes.ReadWrite.CreatedByApp, Notes.ReadWrite, or Notes.ReadWrite.All

Response dataDescription
Success codeA 201 HTTP status code.
Response bodyThe student or teacher that was added.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Remove students and teachers

Removing students and teachers from a class notebook revokes their access to the notebook, but doesn't delete any content.

To remove a student or teacher from a class notebook, send a DELETE request to the appropriate endpoint.

Remove a student

DELETE ../classNotebooks/{notebook-id}/students/{student-id}

Remove a teacher

DELETE ../classNotebooks/{notebook-id}/teachers/{teacher-id}

You can remove one student or one teacher per request.

Example

The following request removes the specified student from the specified class notebook.

Request and response information

Office 365 class notebook

The following information applies to DELETE /students and DELETE /teachers requests.

Request dataDescription
ProtocolAll requests use the SSL/TLS HTTPS protocol.
Authorization header

Bearer {token}, where {token} is a valid OAuth 2.0 access token for your registered app.

If missing or invalid, the request fails with a 401 status code. See Authenticate using Azure AD (enterprise apps).

Accept headerapplication/json
Permission scopeNotes.ReadWrite.CreatedByApp, Notes.ReadWrite, or Notes.ReadWrite.All

Response dataDescription
Success codeA 204 HTTP status code.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Insert sections

Use copySectionsToContentLibrary to copy specific sections from Office 365 notebooks and insert them into the Content Library of a class notebook. A Content Library is a section group inside the class notebook that has Read/Write permissions for teachers and Read permission for students.

To insert sections into a class notebook, send a POST request to the copySectionsToContentLibrary endpoint of the target class notebook. For example:

POST ../classNotebooks/{notebook-id}/copySectionsToContentLibrary

In the message body, send a JSON object with the sectionIds parameter.

ParameterDescription
sectionIdsAn array that contains the IDs of the sections that you want to insert into the class notebook.

The user must have access to the target sections and notebook (owned or shared). All targets must be in the same tenant.

Example

The following request inserts two sections into the Content Library of the specified class notebook.

Request and response information

The following information applies to POST /copySectionsToContentLibrary requests.

Request dataDescription
ProtocolAll requests use the SSL/TLS HTTPS protocol.
Authorization header

Bearer {token}, where {token} is a valid OAuth 2.0 access token for your registered app.

If missing or invalid, the request fails with a 401 status code. See Authenticate using Azure AD (enterprise apps).

Content-Type headerapplication/json
Accept headerapplication/json
Permission scopeNotes.ReadWrite.CreatedByApp, Notes.ReadWrite, or Notes.ReadWrite.All

Response dataDescription
Success codeA 201 HTTP status code.
ErrorsIf the create request fails, the API returns errors in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Distribute page to student

Google Classroom Office 365

To distribute a OneNote page to a student, send a POST request to the classNotebooks endpoint. The following action is only available for the unified group notebooks.

In the message body, send a JSON object with the DistributePageToStudent parameters.

ParameterDescription
studentUserPrincipalNameThe Office 365 user principal name. To learn more about users, see the Azure AD Graph API documentation.
lockStartDateThe lock start date of type DateTimeOffset to be set on the distributed page. Student page will be read-only when the time reaches the lock start date. For more information about page lock, see Use page locking in Class Notebook.
targetSectionNameThe page is copied into the student's section. If the student's section does not exist, it will be created.
assignmentId(optional) The assignment id to be set on the distributed page. If the property is set, there should be one page published for one assignment id, and the lockStartDate would be the assignment due date.
ignoreIfStudentPageExiststrue to ignore copying the page if there is another page with the same assignment id.

Response dataDescription
Success codeA 200 HTTP status code.
Response bodyAn OData representation of the result in JSON format. The value returned is the student page id that got copied.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Example

Update the page lock start date

To update the lock start date of a OneNote page, send a PATCH request to the pages endpoint.

For more information about page lock, see Use page locking in Class Notebook.

In the message body, send a JSON object with the following request data.

Request dataDescription
blockEditsInClientStartDateA DateTimeOffset structure of when the page will be locked for edit. To clear the lock start date, set the property to null; hence, it will be dropped from the page.

Response dataDescription
Success codeA 204 HTTP No Content status code.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Example

Get page lock start date

To get the lock start date that is set on the page, send a GET request to the API pages endpoint to get the page(metadata) with a query parameter blockEditsInClientStartDate=true.

For more information about how to query a page, see Resource paths for GET requests.

For more information about page lock, see Use page locking in Class Notebook.

Response dataDescription
Success codeA 200 HTTP status code.
Response bodyAn OData representation of the page in JSON format. It includes the value of the blockEditsInClientStartDate property.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Example

Response

Update membership

UpdateMembership syncs a default class notebook of a unified group with its membership.

Unified group owners will be added as teachers to a class notebook, and members will be added as students to a class notebook.

To sync the default class notebook membership with a unified group, send a POST request to the classNotebooks endpoint. The following action is only available for the unified group default notebook.

Response dataDescription
Success codeA 204 HTTP No Content status code.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Example

The following example syncs a default class notebook of a unified group id.

Request

Repair a class notebook

To repair a class notebook, send a POST request to the classNotebooks endpoint.

The odata action reads the list of students and teachers from the class notebook metadata. It then reapplies students' permissions to their section groups, _Content Library and _Collaboration Space. It also reapplies teachers' permissions to Students, _Content Library, _Collaboration Space, and _teacher only section groups.

For unified groups, it does not refresh group membership; for that, use the UpdateMembership action instead.

Response dataDescription
Success codeA 204 HTTP No Content status code.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Example

Construct the OneNote service root URL

The OneNote service root URL uses the following format for all calls to the OneNote API.

https://www.onenote.com/api/{version}/{location}/notes/

The version segment in the URL represents the version of the OneNote API that you want to use.

  • Use v1.0 for stable production code.

  • Use beta to try out a feature that's in development. Features and functionality in beta may change, so you shouldn't use it in your production code.

The location segment in the URL represents the location of the notebooks that you want to access:

  • Notebooks on OneDrive for Business

    • Use me for OneNote content that’s owned by the current user.

    • Use users/{id} for OneNote content that the specified user (in the URL) has shared with the current user. Use the Azure AD Graph API to get user IDs.

  • SharePoint site notebooks

    • Team sites and other SharePoint sites can contain OneNote notebooks in their document libraries.

    • Use myOrganization/siteCollections/{id}/sites/{id} for OneNote content in a site in the tenant that the current user is logged into. Only the current tenant is supported, accessed using the myOrganization keyword. Learn how to get site IDs.

  • Unified group notebooks

    • Unified groups (also called Office 365 groups) are part of the Office 365 connected experience. Group members can share notebooks, files, and email.

    • Use myOrganization/groups/{id} for OneNote content in the specified group that the current user is a member of. Unified groups are the only supported group type. Use the Azure AD Graph API to get group IDs.

Use the FromUrl method to get the site collection and site IDs

You can use the FromUrl method to get the site collection and site IDs for a specified absolute site URL. You should make this call only when needed, and then store the values for future use.

The format of the site URL depends on your configuration, for example https://domain.sharepoint.com/site-a or https://domain.com/sites/site-a.

Example request

GET https://www.onenote.com/api/v1.0/myOrganization/siteCollections/FromUrl(url='{full-path-to-SharePoint-site}')

Authorization: Bearer {token}

Accept: application/json

Example response

Requirements for using FromUrl and working with SharePoint site notebooks:

  • You can only create OneNote notebooks, section groups, sections, and pages on sites that have a default document library. (Some site templates don't create a default document library.) However, GET requests return OneNote content from all document libraries on the site.

  • The OneNote service root URL is immutable, meaning you can't use a SharePoint REST API site path and then tack the notes endpoint onto it.

  • The user on whose behalf you're calling must be a member of the site.

  • FromUrl works only with sites that have been indexed. It may take several hours to index a new site.

See also

Office 365 Classroom Notebook Download

  • OneNote Class Notebooks (overview and features)