Enable PeoplePicker for Anonymous access

Posted: 26th September 2015 by Gennady in C#, SharePoint
Tags: , ,

I have custom webpart with PeopleEditor object inside. By default anonymous users will not see it:

control is not available

To show it we need to grant “BrowseUserInfo” permission from SPBasePermissions enumeration(thanks to Karel Hájek’s post, who digged this problem with Reflector).

does_user_have_permissions

Karel offers to edit Content database to grant it, and then configure Active Directory to allow anonymous queries, all is in his post.

From myself I can give advice to never edit SharePoint Content Database directly. There is more simple method using Powershell:

$sharePointSnapin = Get-PSSnapin | Where-Object { $_.Name -eq  "Microsoft.SharePoint.PowerShell"}
if($sharePointSnapin -eq $null)
{
    Add-PSSnapin Microsoft.SharePoint.PowerShell    
}


$web = Get-SPWeb http://portal/web/

$web.AnonymousPermMask64;
# output:    ViewListItems, ViewVersions, ViewFormPages, Open, ViewPages, UseClientIntegration


$web.AnonymousPermMask64 = "$rights, BrowseUserInfo";
$web.Update();

Now PeoplePicker successfully rendered:

people_picker_rendered

Click below to expand comments form..