Anounymous access SharePoint 2010 list data using JavaScript client object model

Below is the PowerShell script to access the data of SharePoint list from webparts using JavaScript client object model Anonymously.

$webapp = Get-SPWebApplication "http://spsite"
$webapp.ClientCallableSettings.AnonymousRestrictedTypes.Remove([microsoft.sharepoint.splist], "GetItems")
$webapp.Update()

Note:

  • Just replace http://spsite with your WebApplication url.
  • “GetItems” remain the same.
  • “AnonymousRestrictedTypes.Add for reversing the changes”
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s