People Search relevance is not optimized when the Active Directory has errors in the manager reporting structure – SharePoint 2013 Health analyzer error
Problem:
SharePoint 2013 Health analyzer logged this error – People Search relevance is not optimized when the Active Directory has errors in the manager reporting structure.
Also, in Windows Event Viewer, from MSSQL$SHAREPOINT Source, “An exception occurred while enqueuing a message in the target queue. Error: 15404, State: 11. Could not obtain information about Windows NT group/user, error code 0x534.”
Root Cause: There are user profiles in the Active directory with no “Manager” property value defined (empty!). SharePoint uses this field for features such as to determine colleagues, social, people search relevance, etc.
Solution:
Set the Manager property value for all users who don’t have it set! Here is the quick way to find a list of users who don’t have the Manager field:
Import-Module ActiveDirectory
Get-ADUser -Filter * | Where-Object {$_.Manager -Eq $Null} | Export-CSV D:\Profiles.csv -notype
Alternatively, although it is not a good idea, you can disable this rule in the SharePoint health monitor if you want to suppress these errors!
What if users don’t have a manager at all?
Say, e.g., by organization’s structure, CxOs may not have a manager, isn’t it? If that’s the case, you’ll have to specify these users as company leaders explicitly. Here is how:
$UPSProxy = Get-SPServiceApplicationProxy | ? {$_.typename -eq "User Profile Service Application Proxy"}
Add-SPProfileLeader -ProfileServiceApplicationProxy $UPSProxy -Name "Domain\Username"
You can follow this Technet article: https://technet.microsoft.com/en-us/library/hh867937%28v=office.14%29.aspx