pnp / pnp/cli-microsoft365

Move to new endpoint to list navigation nodes?

Open
#7,139 5 comments 0 reactions 1 assignee View on GitHub

@waldekmastykarz is already working on this.

Since Sep 2, 2026.

breaking change work in progress
Dominant language
TypeScript
Stars
1.5k
Forks
413
Avg merge
5d 6h
Merged PRs (30d)
21

Description

It might be interesting to move to another API when listing navigation nodes using spo navigation node list. The current output is quite limited. For example, currently it's not possible to check if the open link in new tab checkbox is checked. For migration tasks, this might be an issue.
Therefore, it might be wise to see if we can improve the endpoint. I found a different API that the UI is also using:

GET https://contoso.sharepoint.com/sites/Playground/_api/Navigation/MenuState

[!IMPORTANT]
The API above is only for the quick launch navigation. There is another one for the top navigation as well.

The only issue I currently see is that spo navigation node list is a list command, but the new endpoint doesn't return an array, while that's the output you expect from a list command.

Current command output

[
  {
    "AudienceIds": null,
    "CurrentLCID": 1033,
    "Id": 1031,
    "IsDocLib": true,
    "IsExternal": false,
    "IsVisible": true,
    "ListTemplateType": 0,
    "Title": "Home",
    "Url": "/sites/Playground"
  }
]

New endpoint output

{
  "AudienceIds": [],
  "FriendlyUrlPrefix": "",
  "IsAudienceTargetEnabledForGlobalNav": false,
  "Nodes": [
    {
      "AudienceIds": [],
      "CurrentLCID": 1033,
      "CustomProperties": [],
      "FriendlyUrlSegment": "",
      "IsDeleted": false,
      "IsHidden": false,
      "IsTitleForExistingLanguage": false,
      "Key": "1031",
      "Nodes": [],
      "NodeType": 0,
      "OpenInNewWindow": true,
      "SimpleUrl": "/sites/Playground",
      "Title": "Home",
      "Translations": []
    }
  ],
  "SimpleUrl": "",
  "SPSitePrefix": "/sites/Playground",
  "SPWebPrefix": "/sites/Playground",
  "StartingNodeKey": "1025",
  "StartingNodeTitle": "Quick launch",
  "Version": "2026-02-21T00:12:03.6643426Z"
}


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.