Thursday, August 16, 2012

SharePoint 2010 Profile Synchronization Never let it stop you !

In the past as any developer new to SharePoint 2010 I was facing many problems with profile Synchronization.But the most thing I was afarid of is to be stuck for example if the service hang on Starting what should I do? But afterwards it never stopped me again.

Remember there are two different cases:

You used correct steps from the begining

You didn't know about one of the steps and you are already stuck

I will explain case 1 then case 2 and if you face any problems afterward ask me just never let it stop you.

Case 1:

It could be already added in one of the SharePoint 2010 new updates but you must make sure you have it installed anyway.

First if the User Profile Service Application doesn't exist already Create it by going to :
Central Admin > Application Management > Manage Application Services
On the Robbin Click new then select the User Profile Service

If it does exist just make sure the user of the Application Pool is the SharePoint Service Account

Since you have the Profile Service Application set and ready
Go to Start Menu > Administration Tools > Services
There are two well known FIM services:

Both should have the account set to the same user you used on the User Profile Application Pool above.
foreach service after you set the account set it to start automaticaly.

Go to : Central Admin > System Settings > Services on the server
First start the User Profile Service (If it is not already started) after it is started start the User Profile Synchronization Service.

You will need to select the User Profile Service Application which you have created or corrected before.

You will also be asked to a user name and password which are the User Name and password you used when creating the User Profile Service Application.

﻿

After you Click OK make sure to wait 10 minutes at least (I know this is the most boring part).

After 10 minutes passed refresh the page to see if the User Profile Synchronization have started successfully(If not check Case 2).

Run the iisreset command.
So now go to Manage Service Applications page again and click on the User Profile Service Application link and the User Profile Configurations Page will appear.

Before you can create a Synchronization Connection you need to make sure the SharePoint Services account have replicate directory changes rights.

To do that on the Domain Controller Server go to Administrative Tools then Active Directory Users And Computers.Right click your domain like www.contoso.com and select Delegate Control.

Go through the Delegation Of Control wizard steps.Add the SharePoint Services User.Choose to create a custom task.

Click Next until you reach the permissions page.
Select the replicating directory changes then click Next then Click Finish.

Write a name for your connection and make sure the type is set to Active Directory.Use the SharePoint Services Account user name and password.Leave "Auto Discover Domain Controller" selected and enter your forest name (example:contoso.com)

Click Populate Container.When the whole Active Directory Containers appear make sure to select only the users OU you need to read from (far away better) then Click OK.

You should see your connection created in the Connections Window.

Go to the Synchronization Section again and click on Start Profile Synchronization then select Start Full Synchronization then Click OK.

After few seconds refresh the Profile Configurations Page so you see if the Synchronizing is running by having the status showing Synchronizing.

When it is finished you should see Idle instead of Synchronizing.

Now if you see the number of synchronized people have changed that means you made it successfully!

Case 2:

If you are stuck already for example You have the User Profile Synchronization showing starting all the time don't panic.Because unlike SharePonit 2007 you can go to Manage Service Applications Page and delete the existing User Profile Service Application instance because you can create a new one again so you are not stuck anymore and to confirm that go to the Manage Service Applications Page again and you will find the User Profile Synchronization stopped at last (As soon as you delete the User Profile Serivce Application).
So you can start with the correct steps above to have your user profile synchronization works.

If you are facing any problem related to this subject please add a comment below and I will reply to you as soon as possible.