Home > SharePoint 2010, SharePoint Administration > Fixing: People Search relevance is not optimized when the Active Directory has errors in the Manager Reporting Structure

Fixing: People Search relevance is not optimized when the Active Directory has errors in the Manager Reporting Structure

Follow the steps below to fix the following error ‘People Search relevance is not optimized when the Active Directory has errors in the Manager Reporting Structure‘ found in the SharePoint 2010 Health Analyzer Reports.

1.  Log into the CA Server and bring up SharePoint 2010 Management Shell (PowerShell)
2.  Type $upap = Get-SPServiceApplicationProxy | ? {$_.TypeName -like “*User Profile Service Application*”}
3.  Next Type: Add-SPProfileLeader $upap [domain]\[username]

You will be prompted to confirm:

Are you sure you want to perform this action?
Performing operation “Add-SPProfileLeader” on Target “[domain]\[user name]”.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
<default is “Y”>:

4.  Type Y to confirm

PowerShell well let you know that the username has been added as a Leader

User ‘[domain]\[user name]’ added as a leader.

Go back to The Health Analyzer Report and Reanalyze the problem.  This will fix the error and clear it from the report.

Advertisements
  1. Bas Maree
    October 11, 2011 at 6:51 pm

    Dear JShiddell,

    Which user did you used for “[DOMAIN]\[USERNAME]”. The farm administrator or an other user.

    Kind regards

    Bas Maree

  2. October 13, 2011 at 8:29 am

    Hi Bas Maree,

    I used the farm administrator service account, since this account also has the Replicate Directory Changes permission set within Active Directory. I knew atleast this account had the adaquate permissions within AD. Not sure if that is needed or not.

    If this error ever occurs again i’ll test this by using a different service account, maybe the Search service account.

    Hopefully that helps.

  3. lcad
    February 21, 2012 at 8:32 pm

    For those receiving this error “Add-SPProfileLeader : Object reference not set to an instance of an object.”

    Go into Central Admin > Manage Service Applications and click on the “User Profile Service” then add permissions from the toolbar. Temporarily, grant yourself Full Control of the service. Yourself would be the account executing the PowerShell command.

  4. Renea
    February 23, 2012 at 7:04 pm

    I am receiving the error failed. User [domain]\[username] does not exist. I used our actual CEO’s domain account and I also tried the sharepoint farm account. Neither one worked.

    • February 23, 2012 at 8:33 pm

      Hi Renea,

      Are you running powershell with admin rights?

      Also just to verify you are replacing [domain] with your domain name and [user name] with the user name that has rights to your farm correct?

      Your farm account should have sufficent rights to perform this action.

      I logged into my CA server and ran PowerShell with my domain user account which is part of the farm admin group and I used my sharepoint 2010 farm service account as the [user name] in the script.

      • Renea
        February 23, 2012 at 8:59 pm

        Yes I ran SharePoint Management PowerShell as administrator. Yes I replaced the domain and user name. I tried it once with our CEO’s domain name and account. Then i tried it again with our farm admin account. Both accounts gave me the same error. Does the account need rights specific rights into AD?

  5. July 12, 2012 at 8:50 pm

    Renea said
    February 23, 2012 at 7:04 pm
    I am receiving the error failed. User [domain]\[username] does not exist. I used our actual CEO’s domain account and I also tried the sharepoint farm account. Neither one worked.

    If you enter Add-SPProfileLeader $upap [domain]\[username] you will receive that error. you need to remove the [] brackets so you will have Add-SPProfileLeader $upap domain\username instead and it will run correctly

  6. TheOtherdude
    January 31, 2013 at 10:07 am

    Hi everyone,
    Got the same error and this is our CEO with empty manager field. CEO is available in AD:
    Ran Powershell as Administrator and with Farm admin credentails:

    PS C:\windows\system32> Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name OURDOMAIN\USERID

    Confirm
    Are you sure you want to perform this action?
    Performing operation “Add-SPProfileLeader” on Target “OURDOMAIN\USERID”.
    [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “Y”): y
    Failed. User ‘OURDOMAIN\USERID’ does not exist.

    The above problem all started when I had to rebuild UPS from scratch. Add-SPProfileLeader worked well in the first instance but failed whith the rebuild. Any ideas ?

  7. August 15, 2013 at 8:15 pm

    Bump – having the same issue here with the “Failed: User does not exist” error. Anyone get this licked?

  8. August 15, 2013 at 8:41 pm

    Actually – I fixed it 🙂 When you get this “User does not exist” error, it means the user doesn’t have a profile set up in My Sites yet. I asked my CEO to go into My Sites, it set up his profile, and I was then able to add him as a company leader. Hopefully this helps anyone else out with this issue!

    • sanli
      July 1, 2016 at 8:01 am

      Thank you Richard!!!

  9. AlKol
    July 9, 2014 at 7:54 am

    Thank you lcad

  1. No trackbacks yet.

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

%d bloggers like this: