I get an error in thecontext.ExecuteQuery();
line while trying to connect to the server.
Console.WriteLine("Please enter your username for PWA");
userName = Console.ReadLine();
Console.WriteLine("Please enter your password for PWA");
passWord = Console.ReadLine();
NetworkCredential netcred = new NetworkCredential("user", "password");
SharePointOnlineCredentials orgIDCredential = new SharePointOnlineCredentials(netcred.UserName, netcred.SecurePassword);
context.Credentials = orgIDCredential;
The error ist
Microsoft.SharePoint.Client.ClientRequestException: 'The IDCRL response header from server 'http://xxx.xxx.de/' is not valid. The response header value is 'NTLM'.
If i use context.Credentials = netcred;
I get a different error
System.Net.WebException: 'The remote server returned an error: (401) Unauthorized'.
But I am authorized.
Any ideas how to fix it?