Thursday, January 14, 2010

Error in crawling User Profiles in SharePoint 2010 Beta

While setting up Search in SharePoint 2010. I faced this problem that the user profile were not being crawled. I got the following error

“Error in Portal Crawl Web Service” when I checked the logs I got the following message

“PortalCrawl.GetSite(): System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. At Microsoft.Office.Server.Administration.UserProfileApplicationProxy.DemandAdministrationAccess(UserProfileApplicationAdminRights rights) at Microsoft.SharePoint.Portal.Search.PortalCrawl.PortalCrawl.GetSite(_PortalSite& sSite).”

It seemed to be permission related issue so I opened the Central Admin site and checked the Permissions on the Search Service Application to make sure that my service account has permissions on the Service Application.

Then I went to the Web Application UserPolicy settings (Central Admin -> Security -> User Policy for Web application) and gave my Content access account full control on the Web Application which hosted my site. But after doing all this also I was not able to successful y crawl the User Profiles.

Then I went to Search Service Application -> Content sources and removed the path for User Profile crawl (“sps3://”) from “Local SharePoint Sites” content source and created a new content source called People. Then I changed the path for UserProfile crawl to include ’/my ’ . So now the new path that I added to the content source was “sps3:///my” . I also changed the Crawl Settings from “Crawl everything under the hostname for each start address” to “Only crawl the Site Collection of each start address”.

Then I ran a full crawl and it worked :)

So now if you face a problem in crawling User Profiles in SHarePoint 2010 know what to do.

1 comment:

  1. Thanks Anshul you are a wizard! This work for me too. For my url I used "sps3://my.domainname" as I have a CNAME for my site in the DNS. Also note your "sps3///" with 3 slashes is a type, its 2 slashed of course.

    If the url is incorrect (a dud for whatever reason) the crawl will be stuck in the "starting" status. If the happens then edit the crawl schedules and set them to "none" then press the "stop all crawls" button. Wait for a good 20 minutes and it will stop, as a crawl will retry serveral times before it gives up (about 15 times I read somewhere) it takes a while and will appear to be stuck in the "starting" status.

    Thanks Anshul, keep up the good work man.