//1.promise ClientContext context = new ClientContext(siteUrl); NetworkCredential myCredential = new NetworkCredential(account, securepassWord,[domin]); context.Credentials = myCredential; //2.online ClientContext context = new ClientContext(siteUrl); context.Credentials = new SharePointOnlineCredentials(account,securepassWord);