SharePoint
JSOM Anonymous Access Error: GetItems on list id xxxx-xxxx-xxxx-xxxx blocked
by administrator
Recently I was developing a functionality in SharePoint
2013 which queries the pages libraries, fetch the metadata of every pages and
and display them in a table.
Problem:
It was working fine when the user is logged in, but when
I access the site as anonymous user, it gave me error "The method GetItems on List with id xxxx-xxxx-xxxx-xxxx is blocked
by administrator".
Solution:
So, after a quick googling I found the solution, that there are some restrictions in client object
model for anonymous users. These restrictions are called client callable settings in SharePoint. The
solution is removing the function GetItems from AnonymousRestrictedTypes using
PowerShell: