How to Add Quick Launch As a Child in SharePoint Office 365 Programmatically using CSOM C#

Sathish Nadarajan
SharePoint MVP
Published On :   29 Jan 2017
Visit Count
Today :  2    Total :   2015
Plan, Migrate, Secure, Report
SharePoint & Office 365 Tool. Simple & Easy to Use. 15-Day Trial!

SharePoint Office 365 Tool
Simple & Powerful Tool for Migration, Security & Reporting. Free Trial

In this article, we will be seeing how to Add Quick Launch as a Child in SharePoint Office 365 Programmatically using CSOM C#

 namespace Console.Office365
     using Microsoft.SharePoint.Client;
     using Microsoft.SharePoint.Client.Taxonomy;
     using Newtonsoft.Json.Linq;
     using System;
     using System.Collections.Generic;
     using System.IO;
     using System.Linq;
     using System.Threading.Tasks;
     class Program
         static void Main(string[] args)
         public static void AddQuickLaunchAsChild()
             OfficeDevPnP.Core.AuthenticationManager authMgr = new OfficeDevPnP.Core.AuthenticationManager();
             string siteUrl = "https://****";
             string userName = "Sathish@******";
             string password = "************";
             using (var ctx = authMgr.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userName, password))
                 Web web = ctx.Web;
                 NavigationNodeCollection quickLaunchCollection = web.Navigation.QuickLaunch;
                 NavigationNode parentNode = quickLaunchCollection.Where(n => n.Title == "Heading3").FirstOrDefault();
                 NavigationNodeCreationInformation nodeCreationInformation = new NavigationNodeCreationInformation();
                 nodeCreationInformation.Title = "Heading3.1";
                 nodeCreationInformation.Url = "";

Happy Coding,

Sathish Nadarajan.

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.

Protect Your SharePoint