How to Add a Link to Quick Launch in SharePoint Online?

Requirement: Add Link to Quick Launch Navigation SharePoint Online using PowerShell.

The Quick Launch bar is located on the left side of the page. Quick Launch is more than just a sidebar; it’s a navigational tool that helps users find what they need efficiently. Customizing Quick Launch by adding, removing, or organizing links can tailor the SharePoint site better to fit the needs of your organization or team. This blog post will show you how to add a link to the Quick Launch navigation in SharePoint Online. We will also show you how to use PowerShell to add a link to the Quick Launch navigation bar in SharePoint Online.

To add a link to quick launch navigation in modern SharePoint sites, follow these steps:

  1. Click on the “Edit” link at the bottom of the left navigation menu. (If you don’t see the “Edit” link, you may not have permission to edit quick launch!)
    sharepoint online add link to quick launch
  2. Hover over the quick launch menu and click on the “+” icon where you want to add a link.
  3. On the “Add a link” dialog box, Enter the URL and display name for the link. Click on OK once done!
    sharepoint online add to quick launch
  4. Click on the “Save” button at the bottom of the page to save your changes.

That’s it! The new link should now appear in the Quick Launch on your SharePoint Online site.

Add a link to the left navigation in Classic sites

To add a link in quick launch navigation in classic SharePoint Online sites, do the following:

  1. Go to Site Settings >> Click on “Quick launch” from Look and feel
  2. From the Quick Launch page, You can add a new heading or link by clicking relevant links.
    powershell to add link to quick launch navigation in sharepoint online

If the publishing feature is enabled, You’ll get the “Navigation” link in the site settings.

PowerShell is a powerful tool that allows administrators to automate tasks and customize system settings. Let me show you how to use PowerShell to add a link to the Quick Launch navigation in SharePoint Online.

#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
   
#Config Parameters
$SiteURL="https://Crescent.sharepoint.com/sites/marketing"

#Setup Credentials to connect
$Cred= Get-Credential
$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)

#Setup the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = $Credentials

#Get the Quick launch Navigation of the web 
$QuickLaunch = $Ctx.Web.Navigation.QuickLaunch
$Ctx.load($QuickLaunch)
$Ctx.ExecuteQuery()

#Add link to Quick Launch Navigation
$NavigationNode = New-Object Microsoft.SharePoint.Client.NavigationNodeCreationInformation
$NavigationNode.Title = "Support Center"
$NavigationNode.Url = "https://support.crescent.com"
$NavigationNode.AsLastNode = $True
$Ctx.Load($QuickLaunch.Add($NavigationNode))
$Ctx.ExecuteQuery() 

Let’s add some more functionality to the script so that we can add a link to any specific node:

#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

#Add new Link in Quicklaunch Navigation
Function Add-SPONavigationNode()
{
    Param(
        [Microsoft.SharePoint.Client.NavigationNodeCollection]$Navigation,
        [parameter(Mandatory=$false)][String]$ParentNodeTitle,
        [String]$Title,
        [String]$URL
    )
    #Populate New node data
    $NavigationNode = New-Object Microsoft.SharePoint.Client.NavigationNodeCreationInformation 
    $NavigationNode.Title = $Title
    $NavigationNode.Url = $URL
    $NavigationNode.AsLastNode = $true

    #Get the Parent Node
    $ParentNode = $Navigation | Where-Object {$_.Title -eq $ParentNodeTitle}
    
    #Add New node to the navigation
    If($ParentNode -eq $null)
    {
        #Check if the Link with Title exists already
        $Node = $Navigation | Where-Object {$_.Title -eq $Title}
        If($Node -eq $Null)
        { 
            #Add Link to Root node of the Navigation
            $Ctx.Load($Navigation.Add($NavigationNode))
            $Ctx.ExecuteQuery()
            Write-Host -f Green "New Navigation Node '$Title' Added to the Navigation Root!"
        }
        Else
        {
            Write-Host -f Yellow "Navigation Node '$Title' Already Exists in Root!"
        }
    }
    else
    {
        #Get the Parent Node
        $Ctx.Load($ParentNode)
        $Ctx.Load($ParentNode.Children)
        $Ctx.ExecuteQuery()
 
        $Node = $ParentNode.Children | Where-Object {$_.Title -eq $Title}
        If($Node -eq $Null)
        { 
            #Add Link to Parent Node
            $Ctx.Load($ParentNode.Children.Add($NavigationNode))
            $Ctx.ExecuteQuery()
            Write-Host -f Green "New Navigation Link '$Title' Added to the Parent '$ParentNodeTitle'!"
        }
        Else
        {
            Write-Host -f Yellow "Navigation Node '$Title' Already Exists in Parnet Node '$ParentNodeTitle'!"
        }
    }
}
 
#Config Parameters
$SiteURL="https://Crescent.sharepoint.com/unitedstates"

#Setup Credentials to connect
$Cred= Get-Credential
$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)

#Setup the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = $Credentials

#Get the Quick Launch Navigation of the web
$QuickLaunch = $Ctx.Web.Navigation.QuickLaunch
$Ctx.load($QuickLaunch)
$Ctx.ExecuteQuery()

#Call the function to Add a New Node in Root of the navigation
Add-SPONavigationNode -Navigation $QuickLaunch -Title "Support Center" -URL "https://support.crescent.com"

#Call the function to Add a link in "Support Center" node of the navigation
Add-SPONavigationNode -Navigation $QuickLaunch -ParentNodeTitle "Support Center" -Title "Application Support" -URL "https://suppport.crescent.com/apps"

If you want to add a link to the Quick Launch navigation bar, the PnP PowerShell cmdlet Add-PnPNavigationNode can help!

#Config Variables
$SiteURL = "https://crescent.sharepoint.com/us"

#Get Credentials to connect
$Cred = Get-Credential

Try {
    #Connect to PnP Online
    Connect-PnPOnline -Url $SiteURL -Credentials $Cred
    
    #Add a Link to Quick Launch Navigation
    Add-PnPNavigationNode -Title "Support Center" -Url "https://support.crescent.com" -Location "QuickLaunch"

    #Get the Navigation node "Support Center"
    $ParentID = Get-PnPNavigationNode -Location QuickLaunch | Where {$_.Title -eq "Support Center"}  | Select -ExpandProperty ID
    #Add a link under "Support Center
    Add-PnPNavigationNode -Title "Application Support" -Url "https://support.crescent.com/apps" -Location "QuickLaunch" -Parent $ParentID
 
    Write-host "Quick Launch Links Added Successfully!" -f Green
}
catch {
    write-host "Error: $($_.Exception.Message)" -foregroundcolor Red
}

Navigate to your SharePoint site to ensure the link has been added to the Quick Launch bar successfully. You can adjust the order or modify the links through the SharePoint interface as needed.

Similarly, to add an external website link in SharePoint left navigation, use the -External switch:

Add-PnPNavigationNode -Title "Crescent Public Site" -Url "https://www.crescent.com" -Location "QuickLaunch" -External

The external link will now appear in the Quick Launch navigation menu and open in a new tab when clicked.

Conclusion

Quick Launch, a feature prominently displayed on the left-hand side of your SharePoint site, serves as the central hub for navigation, allowing users to access important links, documents, and pages quickly. Adding custom links to Quick Launch can significantly improve navigation and ensure users have quick access to vital resources.

In this article, we explored two methods for adding links to the Quick Launch: using the SharePoint user interface and using PowerShell. We also looked at real-world examples of adding links to document libraries and external websites.

To remove a link from the navigation, use: How to Remove a Link in Quick Launch or Top Navigation in SharePoint Online using PowerShell?

What is Quick Launch in SharePoint?

Quick Launch is the left-hand navigation menu in SharePoint that appears on every page within a site. It provides quick access to important content, such as lists, libraries, pages, and external links.

How do I enable or disable Quick Launch in SharePoint?

To enable or disable Quick Launch in SharePoint, Go to your SharePoint site. Click on the “Settings” gear icon and select “Change the Look” and then “Navigation.” Then, you can enable or disable the navigation by setting the “Site Navigation visibility” switch.

Can I customize the Quick Launch navigation?

Yes, you can customize the Quick Launch navigation by adding, editing, or removing links. You can do this through the SharePoint user interface or by using PowerShell (PnP PowerShell) for more advanced customization.

How do I add a document library to site navigation?

Navigate to SharePoint Online Document Library >> Click on Settings >> Document Library Settings. Click on the “List name, description and navigation” link under “General Settings” and set “Yes” for “Display this document library on the Quick Launch?” and then hit the save button. You can also use PowerShell to set the “OnQuickLaunch” property to add the SharePoint Online document library to the site navigation.
More info: SharePoint Online Add Document Library to Quick Launch

How to hide site contents in SharePoint Online?

Navigate to your SharePoint Online site >> Click on the “Edit” link under the quick launch navigation >> Click on the little three dots next to the “Site contents” menu item to get its context menu. Select “Remove” from the context menu >> Click on the Save button to hide site contents from the quick launch.
More info: SharePoint Online: Hide “Site Contents” from Quick Launch

Can I reorder the links in the Quick Launch navigation?

Yes, you can reorder the links in the Quick Launch navigation by dragging and dropping them to the desired position. Simply edit the Quick Launch links and use the arrow icons next to each link to move them up or down.

How can I rename or delete links in the Quick Launch navigation?

To rename or delete links in the Quick Launch navigation: Go to the SharePoint Online site >> Click on the “Edit” link at the bottom of the left navigation >> Click on the little three dots next to the link you want to rename or delete. Choose the desired action and update the link title and URL as needed. To delete, click on “Remove” from the context menu. Click “OK” to save the changes.

Are there any limitations to the number of links I can add to the Quick Launch navigation?

While there is no hard limit on the number of links you can add to the Quick Launch navigation, it’s recommended to keep the navigation concise and well-organized. Having too many links can make the navigation cluttered and difficult to use.

Why can’t I see some of my changes reflected in the Quick Launch immediately?

Changes to the Quick Launch might not appear immediately due to browser caching. Try refreshing the page or clearing your browser’s cache. Additionally, if your site is part of a large SharePoint environment, changes might take a few moments to propagate.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

3 thoughts on “How to Add a Link to Quick Launch in SharePoint Online?

  • This is brilliant, thank you so much!
    I have been trying to create a full script to set the quick launch navigation, I am getting there but having 2 issues:
    – When I am trying to add a link as a “sub menu”, using the -Parent switch, I am getting a warning: “WARNING: Something went wrong while trying to set AudienceIDs or Open in new tab property” while both arguments are empty and not in the command line. it stops the script unfortunately
    – How can I check that the sub menu exists or not, in order not to have doublons… any hint would be appreciated 🙂

    Reply
  • How can this be done programatically with C#?

    Reply
  • Can you just rearrange the items that are there?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *