,

The method “GetItems” of the type “List” with id “{Guid}” is blocked by the administrator on the server.

SharePointCafe Admin Avatar
I was working on SharePoint Client Context, and i was writing a piece of code to fetch items from SharePoint list.

I got this error at this line:
objContext.ExecuteQuery(); 

I solved this issue by executing powershell command.
Open SharePoint Powershell  and type below command one by one.


  • $webapp = Get-SPWebApplication "http://spserver"

  • $webapp.ClientCallableSettings.AnonymousRestrictedTypes.Remove([microsoft.sharepoint.splist], "GetItems")

  • $webapp.Update()



Open SharePoint Powershell  and type below command one by one.Now run your code, you can now access SharePoint List Data.

Tagged in :

SharePointCafe Admin Avatar

3 responses to “The method “GetItems” of the type “List” with id “{Guid}” is blocked by the administrator on the server.”

  1. Anonymous Avatar
    Anonymous

    I was stuck in my project due to this error. Thank you for writing this blog.

  2. Anonymous Avatar
    Anonymous

    Nice blog- sharepoint cafe

  3. Anonymous Avatar
    Anonymous

    it saves a lot of time for me.
    Thank you very much.

Leave a Reply

Your email address will not be published. Required fields are marked *

RSS
YouTube
YouTube
Instagram