Thursday, June 7, 2012

Importing user profile picture from Active Directory to SharePoint 2010 My site


This section describes how to import the profile pictures from Active directory to My Profile. Pre requirement for this configuration is My Site is configuration.

First time when you visit My Profile page, the profile picture is empty. By clicking Edit My Profile link you can add profile photos. 

 

We can import profile picture from the Active Directory to My Profile without uploading manually. Following steps will help.

Picture mapping:
1.       Go to Central Administration, Application Management and click Manage service applications. 

2.       Click right side of the User Profile Service Application and click Manage from the ribbon. 

3.       Click Manage User Properties under People section. 

4.       Find the property named  Picture. Click on the Picture and select Edit to go to Edit User Profile Property page. 

5.       In Display Settings section select all three options.

 

6.       In Add New Mapping section select the right Active Directory data connection source, select thumbnailPhoto as the Attribute and direction as Import. Click Add.


7.       Once complete click Ok.

We have created the mappings for Picture from AD to SharePoint in import direction. It will import the profile pictures to SharePoint.

Next job is to run the full profile synchronization.
1.       Go to Central Administration, Application Management and click Manage service applications. 

2.       Click right side of the User Profile Service Application and click Manage from the ribbon. 

3.       Click Start Profile Synchronization under Synchronization section. 

4.       Select Start Full Synchronization option and click Ok.


5.       Full Synchronization will take time to complete. Wait till complete running the synchronization job.

The profile synchronization job will import all the thumbnailPhoto s from AD to the picture library call User Photos. To check this, go to View All site content from Site Action menu and select User Photos picture library. 
The next step is running a command in management shell. Open Management Shell and run the following command.
 
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation

Ex: Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://bll-shpdev-01:7879

You need to have the right permission to run this command. You should be the one of the site collection administrator of the My site to run this command.

Go back to your profile page to see the result.




3 comments: