I am trying to connect to a Sharepoint instance to publish some content using a third-party tool.
I have no control over the Sharepoint instance, but I am sure that my account has full permissions.
ClientContext ctx = new ClientContext("https://thesharepointsite.com");
ctx.Credentials = new System.Net.NetworkCredential(@"username", "password", "domain");
Web w = ctx.Web;
ctx.Load(w);
ctx.ExecuteQuery();
In the line ExecuteQuery, I get an exception:
The remote server returned an error: (401) Unauthorized.
(There is no internal exception.)
I can confirm that the URL and credentials work when logging into the browser.
Based on this question , I believe this is a permissions issue.
If so, what permission do I need to request?
Other questions "I tried without success:
401 Error - Sharepoint 2007
SharePoint Server Authentication Failure
401 Unauthorized exception while reading data from a SharePoint 2010 document library
Update
. Sharepoint, Office 365, ( ). , .
. . , , .