Skip to content

Move to new endpoint to list navigation nodes? #7139

@milanholemans

Description

@milanholemans

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"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions