I'm trying to connect to a Sharepoint instance to publish some content via a 3rd party tool.
I don't have control of the Sharepoint instance, but am assured 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();
On the ExecuteQuery line, I get the exception:
The remote server returned an error: (401) Unauthorized.
(There is no inner exception.)
I can confirm the url & credentials work when I login via a browser.
Based on this question, my assumption is that it is a permissions issue.
If that's the case, then what permission do I need to ask for?
Other questions' I've tried without success:
SharePoint Server Authentication Error
401 unauthorized exception while reading data from the document library SharePoint 2010
Update
I've tried a variety of other queries with the same response. We have an Sharepoint, Office 365 instance and that works (using Remote Authentication). This is also why I believe its some sort of permission or access related.
This is on a customer's instance. I have only the one account. I believe if I asked for a 2nd one, it would have the same issue.