1

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?

1 Answer 1

0

You should try adding the base permission Use Remote Interfaces to the permission level the user has been assigned.
You may also try to disable "Require Use Remote Interfaces permission" at the Web application level from the Central Administration, see e.g. here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.