In this blog, we have discussed adding, retrieving, and deleting the SharePoint online quick launch navigation menu using the C# Server Object model. Follow the below coding to get the result.
Add new term in the quick launch
Add the below code in your Program.cs.
- namespace GetNavigationNode {
- class Program {
- static void Main(string[] args) {
- string userName = "[email protected]";
- string password = "********";
- string siteUrl = "https:// tenantname.sharepoint.com/sites/AssociateSite";
- SecureString securePassword = new SecureString();
- foreach(char c in password) {
- secure Password.AppendChar(c);
- }
- var credentials = new SharePointOnlineCredentials(userName, securePassword);
- using(ClientContext clientContext = new ClientContext(siteUrl)) {
- client Context.Credentials = credentials;
- Navigation NodeCollection qlNavNodeColl = clientContext.Web.Navigation.QuickLaunch;
- client Context.Load(clientContext.Web);
- clientContext.Load(qlNavNodeColl);
- clientContext.ExecuteQuery();
- NavigationNodeCreationInformation newNode = new NavigationNodeCreationInformation();
- newNode.Title = "Search";
- newNode.Url = "https://www.google.com";
- qlNavNodeColl.Add(newNode);
- clientContext.ExecuteQuery();
- }
- }
- }
- }
After running the code,


Join the conversation! Your thoughts help the community grow.