spo navigation node add
Adds a navigation node to the specified site navigation
Usage
m365 spo navigation node add [options]
Options
-u, --webUrl <webUrl>Absolute URL of the site to which navigation should be modified.
-l, --location [location]Navigation type where the node should be added. Available options:
QuickLaunch,TopNavigationBar. Specify eitherlocationorparentNodeIdbut not both.-t, --title <title>Navigation node title.
--url [url]Navigation node URL. When not specified a linkless label will be created.
--parentNodeId [parentNodeId]ID of the node below which the node should be added. Specify either
locationorparentNodeIdbut not both.--audienceIds [audienceIds]Comma-separated list of group IDs that will be used for audience targeting. The limit is 10 ids per navigation node.
--openInNewWindowSet, if the link has to be opened in a new window.
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,response,full. Default isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Remarks
To enable/disable audience targeting for the navigation bar, use the spo web set command.
Examples
Add a navigation node pointing to a SharePoint page to the top navigation.
m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location TopNavigationBar --title About --url /sites/team-s/sitepages/about.aspx
Add a navigation node pointing to an external page to the quick launch.
m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location QuickLaunch --title "About us" --url https://contoso.com/about-us
Add a navigation node below an existing node and opens it in a new window.
m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --parentNodeId 2010 --title About --url /sites/team-s/sitepages/about.aspx --openInNewWindow
Add a navigation node to the top navigation which is audience targetted and open it in a new window.
m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location TopNavigationBar --title About --url /sites/team-s/sitepages/about.aspx --audienceIds "7aa4a1ca-4035-4f2f-bac7-7beada59b5ba,4bbf236f-a131-4019-b4a2-315902fcfa3a" --openInNewWindow
Add a linkless label to the quick launch.
m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location QuickLaunch --title Resources
Response
- JSON
- Text
- CSV
- Markdown
{
"AudienceIds": [
"7aa4a1ca-4035-4f2f-bac7-7beada59b5ba"
],
"CurrentLCID": 1033,
"CustomProperties": [],
"FriendlyUrlSegment": "",
"IsDeleted": false,
"IsHidden": false,
"IsTitleForExistingLanguage": false,
"Key": "2030",
"Nodes": [],
"NodeType": 0,
"OpenInNewWindow": true,
"SimpleUrl": "https://contoso.sharepoint.com",
"Title": "Navigation Link",
"Translations": []
}
AudienceIds : ["7aa4a1ca-4035-4f2f-bac7-7beada59b5ba"]
CurrentLCID : 1033
CustomProperties : []
FriendlyUrlSegment :
IsDeleted : false
IsHidden : false
IsTitleForExistingLanguage: false
Key : 2030
NodeType : 0
Nodes : []
OpenInNewWindow : true
SimpleUrl : https://contoso.sharepoint.com
Title : Navigation Link
Translations : []
CurrentLCID,FriendlyUrlSegment,IsDeleted,IsHidden,IsTitleForExistingLanguage,Key,NodeType,OpenInNewWindow,SimpleUrl,Title
1033,,0,0,0,2030,0,1,https://contoso.sharepoint.com,Navigation Link
# spo navigation node add --webUrl "https://contoso.sharepoint.com/sites/team-a" --location "TopNavigationBar" --title "Navigation Link" --url "https://contoso.sharepoint.com" --openInNewWindow "true"
Date: 10/7/2026
## Navigation Link
Property | Value
---------|-------
CurrentLCID | 1033
FriendlyUrlSegment |
IsDeleted | false
IsHidden | false
IsTitleForExistingLanguage | false
Key | 2030
NodeType | 0
OpenInNewWindow | true
SimpleUrl | https://contoso.sharepoint.com
Title | Navigation Link