Skip to content

Latest commit

 

History

History
168 lines (122 loc) · 5.17 KB

File metadata and controls

168 lines (122 loc) · 5.17 KB

import Global from '../../_global.mdx'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

onenote page list

Retrieve a list of OneNote pages.

Usage

m365 onenote page list [options]

Options

`--userId [userId]`
: Id of the user. Use either `userId`, `userName`, `groupId`, `groupName` or `webUrl` but not multiple.

`--userName [userName]`
: Name of the user. Use either `userId`, `userName`, `groupId`, `groupName` or `webUrl` but not multiple.

`--groupId [groupId]`
: Id of the SharePoint group. Use either `userId`, `userName`, `groupId`, `groupName` or `webUrl` but not multiple.

`--groupName [groupName]`
: Name of the SharePoint group. Use either `userId`, `userName`, `groupId`, `groupName` or `webUrl` but not multiple.

`-u, --webUrl [webUrl]`
: URL of the SharePoint site. Use either `userId`, `userName`, `groupId`, `groupName` or `webUrl` but not multiple.

Remarks

When you don't specify either userId, userName, groupId, groupName or webUrl, the OneNote pages will be retrieved of the currently logged in user.

Permissions

Resource Permissions
Microsoft Graph Notes.Read.All, Sites.Read.All, User.ReadBasic.All, Group.Read.All

This command does not support application permissions.

Examples

List Microsoft OneNote pages for the currently logged in user.

m365 onenote page list

List Microsoft OneNote pages in a specific group specified by id.

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

List Microsoft OneNote pages in a specific group specified by name.

m365 onenote page list --groupName "MyGroup"

List Microsoft OneNote pages for a specific user specified by name.

m365 onenote page list --userName [email protected]

List Microsoft OneNote pages for a specific user specified by id.

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

List Microsoft OneNote pages for a specific site.

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

Response

[
  {
    "id": "1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678",
    "self": "https://graph.microsoft.com/v1.0/users/[email protected]/onenote/pages/1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678",
    "createdDateTime": "2023-01-07T10:57:15Z",
    "title": "Page B",
    "createdByAppId": "",
    "contentUrl": "https://graph.microsoft.com/v1.0/users/[email protected]/onenote/pages/1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678/content",
    "lastModifiedDateTime": "2023-01-07T10:57:17Z",
    "links": {
      "oneNoteClientUrl": {
        "href": "onenote:https://contoso-my.sharepoint.com/personal/john_contoso_com/Documents/Notitieblokken/My%20OneNote/Test.one#Page%20B&section-id=94cacaca-d6b5-428d-b967-d3cf01b95c28&page-id=46a1b220-7ffd-4512-a571-55322097c08d&end"
      },
      "oneNoteWebUrl": {
        "href": "https://contoso-my.sharepoint.com/personal/john_contoso_com/Documents/Notitieblokken/My%20OneNote?wd=target%28Test.one%7C94cacaca-d6b5-428d-b967-d3cf01b95c28%2FPage%20B%7C46a1b220-7ffd-4512-a571-55322097c08d%2F%29"
      }
    },
    "parentSection": {
      "id": "1-3eb21088-b613-4698-98df-92a7d34e0678",
      "displayName": "Test",
      "self": "https://graph.microsoft.com/v1.0/users/[email protected]/onenote/sections/1-3eb21088-b613-4698-98df-92a7d34e0678"
    }
  }
]
createdDateTime       title   id
--------------------  ------  --------------------------------------------------------------------------
2023-01-07T10:57:15Z  Page B  1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678
createdDateTime,title,id
2023-01-07T10:57:15Z,Page B,1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678
# onenote page list --userName "[email protected]"

Date: 07/01/2023

## Page A (1-a26aaec43ed348bd82edf4eb44e73d6c!14-3eb21088-b613-4698-98df-92a7d34e0678)

## Page B (1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678)

Property | Value
---------|-------
id | 1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678
self | https://graph.microsoft.com/v1.0/users/[email protected]/onenote/pages/1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678
createdDateTime | 2023-01-07T10:57:15Z
title | Page B
createdByAppId |
contentUrl | https://graph.microsoft.com/v1.0/users/[email protected]/onenote/pages/1-a26aaec43ed348bd82edf4eb44e73d6c!68-3eb21088-b613-4698-98df-92a7d34e0678/content
lastModifiedDateTime | 2023-01-07T10:57:17Z