Skip to main content

onenote notebook list

Retrieve a list of notebooks.

Usage

m365 onenote notebook list [options]

Options

--userId [userId]

Id of the user. Use either userId or userName, but not both.

--userName [userName]

Name of the user. Use either userId or userName, but not both.

--groupId [groupId]

Id of the SharePoint group. Use either groupName or groupId, but not both

--groupName [groupName]

Name of the SharePoint group. Use either groupName or groupId, but not both.

-u, --webUrl [webUrl]

URL of the SharePoint site.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Examples

List Microsoft OneNote notebooks for the currently logged in user

m365 onenote notebook list

List Microsoft OneNote notebooks in group 233e43d0-dc6a-482e-9b4e-0de7a7bce9b4

m365 onenote notebook list --groupId 233e43d0-dc6a-482e-9b4e-0de7a7bce9b4

List Microsoft OneNote notebooks in group My Group

m365 onenote notebook list --groupName "MyGroup"

List Microsoft OneNote notebooks from a user by user name

m365 onenote notebook list --userName user1@contoso.onmicrosoft.com

List Microsoft OneNote notebooks for user 2609af39-7775-4f94-a3dc-0dd67657e900

m365 onenote notebook list --userId 2609af39-7775-4f94-a3dc-0dd67657e900

List Microsoft OneNote notebooks for site https://contoso.sharepoint.com/sites/testsite

m365 onenote notebook list --webUrl https://contoso.sharepoint.com/sites/testsite

Response

[
{
"id": "1-9cf762f6-b931-4035-8bf3-67c710887c5a",
"self": "https://graph.microsoft.com/v1.0/users/0649d0bd-53dc-4e1d-a357-76f1d92d447b/onenote/notebooks/1-9cf762f6-b931-4035-8bf3-67c710887c5a",
"createdDateTime": "2018-11-17T13:06:42Z",
"displayName": "TeamsNotebook(Shared)",
"lastModifiedDateTime": "2018-11-17T13:06:42Z",
"isDefault": false,
"userRole": "Owner",
"isShared": false,
"sectionsUrl": "https://graph.microsoft.com/v1.0/users/0649d0bd-53dc-4e1d-a357-76f1d92d447b/onenote/notebooks/1-9cf762f6-b931-4035-8bf3-67c710887c5a/sections",
"sectionGroupsUrl": "https://graph.microsoft.com/v1.0/users/0649d0bd-53dc-4e1d-a357-76f1d92d447b/onenote/notebooks/1-9cf762f6-b931-4035-8bf3-67c710887c5a/sectionGroups",
"createdBy": {
"user": {
"id": "0649d0bd-53dc-4e1d-a357-76f1d92d447b",
"displayName": "John"
}
},
"lastModifiedBy": {
"user": {
"id": "0649d0bd-53dc-4e1d-a357-76f1d92d447b",
"displayName": "John"
}
},
"links": {
"oneNoteClientUrl": {
"href": "onenote:https://contoso-my.sharepoint.com/personal/john_contoso_onmicrosoft_com/Documents/Notebooks/TeamsNotebook(Shared)"
},
"oneNoteWebUrl": {
"href": "https://contoso-my.sharepoint.com/personal/john_contoso_onmicrosoft_com/Documents/Notebooks/TeamsNotebook(Shared)"
}
}
}
]

More information

CTRL + M