Skip to main content

Import profile picture from Active directory to SharePoint 2013 User Profile


Recently I came across a requirement in one of the SharePoint 2013 on premise portal implementation. All the user’s picture is updated in active directory, the question was can we import this picture uploaded to active directory to the Picture property in user profile. The answer is yes and in this post I am explaining the steps for doing it so.
So first thing I wanted to do in my development environment to update the photo in the active directory. It can be done by PowerShell script, but I found a nice that can do this task and thankfully there is a free version available. You can find the tool from the below link.
http://www.cjwdev.co.uk/Software/ADPhotoEdit/Info.html
I downloaded the tool and installed on my development environment. Uploading profile picture with the tool is easy and straight forward, just select the user account and then select an image.
For the purpose of this post, I uploaded a sample picture for the account “SPSetup”. The below is a screenshot of the tool
clip_image001
The photo will be uploaded to thumbnailPhoto property in the active directory. You can view the properties using the ADSI Editor.
https://technet.microsoft.com/en-us/library/cc773354%28v=ws.10%29.aspx
From the ADSI editor, you can see the thumbnail photo is updated.
clip_image003
Now I need to import this to the Picture property in SharePoint 2013 user profile. The remaining part of this post details the steps needed to import the thumbnailPhoto from active directory to the Picture property in User profile. From central administration, go to manage service applications, select the user profile service application.
clip_image005
Select Manage user properties link so that you will get all user profile properties available. In the user profile properties, locate the Picture property as shown below.
clip_image007
Click on the right arrow next to the Picture property and select Edit
clip_image009
In the User profile property edit page, scroll down to the bottom of the page, you will see the property mapping for the selected property. Since we do not added a mapping yet for the picture property, let us add a mapping now. You need to select a connection (You can create Connections under the Synchronization connections under your user profile service application). Then as we described earlier, the photo is uploaded to thumbnailPhoto property in the active directory, make sure the direction is selected as import. Click Add button once you are done.
clip_image011
Once added, you will see the mapping under the Property Mapping section.
clip_image013
Click OK to go to the user profile service application. Now run profile synchronization so that the property will be imported.
clip_image015
In the synchronization page, you can select the type of synchronization you want, whether it is incremental or full and click OK
clip_image017
Now in the User Profile service application page, you will see the status of the synchronization in the right side block.
clip_image018
Now once the profile synchronization is done, check whether the user profile photo is updated? The easiest way to do that to check the user’s personal site and see whether the personal site is updated with the picture. To my surprise, I found the picture is not updated. You can see the default picture appears for the SPSetup user even though I have updated it through the tool.
clip_image020
This is a known issue and there is a KB article release by Microsoft that represents this issue. (Though it was for SharePoint 2010, I think the picture URL issue applies to SharePoint 2013) This issue may get fixed in some cumulative updates of SharePoint 2013, so it worth checking whether the photo is updated before applying the fix.
http://support.microsoft.com/kb/2394320
As the KB article states run the following command in the powershell.
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation <url to my site host>
See the screenshot of the PowerShell command executed (http://sp2013:11700 is the MySite host).
clip_image022
Now check the personal site and you will see the picture is updated.
clip_image024

If you have user pictures already updated in active directory as part of your company policy, you can easily import those to SharePoint.

Comments