I have a user that has read-permission to a specific list. On SharePoint he can display the list content. When I try to do the same using CSOM and his Login-Credentials I retrieve an error
Code-Snippet:
ClientContext userContext = new ClientContext("http://example.com/mysite");
userContext.Credentials = new NetworkCredential("user", "password");
using (var context=userContext) {
var list = GetListByTitle(context, "MyList");
var listItems = list.GetItems(new CamlQuery());
context.Load(listItems);
context.ExecuteQuery();
}
on the ExecuteQuery() I retrieve the error: Microsoft.SharePoint.Client.ServerUnauthorizedAccessException (Access denied)
If I increase the users permission to admin-level, he can access the list using clientContext. (But I only want to give him read-permissions for that list)
Is there any client-specific permission that is needed to allow the user to retrieve the data using Client-Object-Model?