Hi,
We have setup our SharePoint 2016/ProjectServer on-premise environment and we use NTLM to connect to the site. I installed Microsoft.SharePointOnline.CSOM and try to get the list of published projects. But always get 401(Unauthorized) status code.
string url = "http://url";
string username = "username";
string password = "password";
ProjectContext clientContext = new ProjectContext(url);
SecureString securestring = new SecureString();
password.ToCharArray().ToList().ForEach(s => securestring.AppendChar(s));
clientContext.Credentials = new NetworkCredential(username, securestring, "domain");
clientContext.Load(clientContext.Projects);
clientContext.ExecuteQuery();
Could you please let me know how we can solve this authorization issue?
Thanks for your help.