Thursday, June 12, 2014

SharePoint 2013: People search relevance is not optimized when the Active Directory has errors in the manager reporting structure

Problem

You find the following entry in the SharePoint 2013 Central Administration, Review problems and solutions, All Reports listing:

TitlePeople search relevance is not optimized when the Active Directory has errors in the manager reporting structure
Severity2 - Warning
CategoryConfiguration
ExplanationIn Active Directory, only company leaders should have the 'manager' property set to NULL. As a result of errors, the Active Directory can incorrectly have the 'manager' property set to NULL for other users that can cause a decrease in people search relevance. By specifying the actual leaders of the company, these inconsistencies are not taken into account and the relevance problem is corrected.
RemedySpecify the company leaders explicitly. Use the following PowerShell commands: $upap = Get-SPServiceApplicationProxy [appid]; Add-SPProfileLeader $upap [Domain]\[UserName]. Run 'Get-SPProfileLeader $upap' to check whether the leader was successfully added. As a last step, run a full crawl on the content source containing the start address (URL) of the user profile application. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=248249".
Failing Servers 
Failing ServicesUserProfileService
Rule SettingsView
  
Solution
  1. Determine the company leader or leaders that you want to define.  For example, DOMAIN\Department.Head.
  2. Remote into a farm server (that hosts SharePoint Server) as the farm setup user administrator account.
  3. Grant the farm setup user administrator account full control to the User Profile Service connection.
  4. Open a SharePoint Management Shell as administrator.
  5. Get the User Profile Service application proxy ID by executing the following command:
    Get-SPServiceApplicationProxy
    This returns a list of all the application proxies (and their IDs) on your farm.
  6. Using the ID you obtained in the previous step, now get an instance of the User Profile Service application proxy by executing the following command:
    $upaProxy = Get-SPServiceApplicationProxy [YourUpsApplicationProxyID]
  7. Now add the leader or leaders by repeatedly executing the following command as needed against this instance:
    Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name "DOMAIN\Department.Head"
  8. Close the shell.
  9. Navigate to: General Application Settings > Search > Farm Search Administration > Search Service > Content Sources.
  10. Launch a full crawl of user profile content.
  11. Navigate back to the Review problems and solutions page.
  12. Re-analyze the issue.  The results should be immediate.
References
Notes
  • If you are working within an department that is part of a larger organization, and your farm access is limited to the department, identify the most senior leader or leaders in your department. Scope is important here.  For example, for one customer, the farm is accessible only within a specific department of the organization; and thus I configured the User Profile Service connection to only pull those user profiles from the organization's AD that are within the department.  Therefore, in this scenario, the profile leader is the head of the department, because, within the bounds of the department, the department head does not report to anyone else.
  • If you haven't done so yet, configure your User Profile Service content as a separate content source for Search purposes.  Doing so makes it more convenient to perform focus content crawls and thereby minimize impact search crawls may have on farm performance during normal business hours.
  • If you get this error,
    Add-SPProfileLeader : UserProfileApplicationNotAvailableException_Logging :: UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have 011651c9-c8ce-4520-9eab-d4bcad5534fe At line:1 char:1 + Add-SPProfileLeader + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Offic...CmdletAddLeader:SPCmdletAddLeader) [ Add-SPProfileLeader], UserProfileApplicationNotAvailableException + FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.SPCmdletAddLeader
    the account you are running the shell under does not have the necessary permissions.  To fix this, use this procedure.

No comments: