Monday, March 9, 2015

SharePoint 2013: How to rebuild the User Profile Service Application


This posting consolidates notes with regard to rebuilding the User Profile Service Application. A rebuild is sometimes indicated when experiencing failures in the service application, failures in profile synchronization, or other UPA issues.  This procedure focuses on UPA installation and assumes that My Site remains available and is not removed.  You will need to keep at hand the service account (and pwd) used specifically to read user profiles from Active Directory.  The connection type used in this rebuild is SharePoint Profile Synchronization.

  1. Prepare for rebuild
    1. Review UPA concepts
    2. Identify the SharePoint Setup User Administrator account and its password
    3. Identify the profile synchronization account and its password.
    4. Verify that it has been granted Replicate Directory Changes permission (needed when using SharePoint Profile Synchronization).
    5. Verify that the NETWORK SERVICE account has read permission to the SharePoint root folder ("15.0" for 2013).
    6. Verify that there are no active synchronization connections.
      • CA > Application Management > Manage service applications > User Profile Service > Profile Synchronization Status
      • CA > Application Management > Manage service applications > User Profile Service > Synchronization > configure Synchronization Connections
  2. Remove the User Profile Service Application
  3. Stop any in-progress User Profile synchronizations
  4. Restart the SharePoint Timer Service
  5. Install a new UPA instance
  6. Start the UPA instance
  7. Configure a new synchronization connection
  8. Launch a new synchronization
Additional References
  • Whatever account you use to perform this procedure, it must be the same account as that used to originally install SharePoint.  Microsoft indicates that this should be the SharePoint Setup User Administrator account
  • User Profile Synchronization Service stuck on starting: I found that even after removing the User Profile service application that the User Profile Synchronization Service remained stuck on Starting.  Even restarting the server did not change this. After further exploration, I was able to change it into the Stopped state by performing the following steps:
    1. Get-SPServiceInstance: this returned a listing of service instances on all SharePoint servers.  You can clean up the output by using: Get-SPServiceInstance | Where-Object {$_.Server -Like "*yourserver*"} | Select-Object TypeName, ID | Sort-Object TypeName
    2. Searched through this listing for User Profile Synchronization Service, and then noted its Id (not the UserProfileApplicationGuid).
    3. Stop-SPServiceInstance -Identity <theID>: checking in CA > Manage Services on Server, this changed the status to Stopping.
    4. Restarted SharePoint Timer Service: checked Manage Services on Server again, and after a few seconds, the status changed to Stopped.


Andrew said...

I am getting a user not found error on the mysites. Any idea what this could be?

Al said...

Can you provide the full context of this message?