Anonymous accessing list items using Client Object Model – Error message he method “GetItems” of the type “List” with id is blocked by the administrator on the server.n at Microsoft.SharePoint.Client.ServerStub.CheckBlockedMethod(String methodName, ProxyContext proxyContext)
Hi Team,
Whenever you try to access list items using CSOM object model and you have only anonymous access and not the access to the site. you may face the issue “”GetItems” of the type “List” with id is blocked by the administrator on the server.n at Microsoft.SharePoint.Client.ServerStub.CheckBlockedMethod(String methodName, ProxyContext proxyContext)”
To avoid this you have to run the following powershell script, so that anonymous users can access the list get items by
$webapp = Get-SPWebApplication “http://yourwebapplication”
$webapp.ClientCallableSettings.AnonymousRestrictedTypes.Remove([microsoft.sharepoint.splist], “GetItems”)
$webapp.Update()
Happy SharePointing Folks.!!