Tuesday, January 8, 2013

SharePoint 2013 User Profile Service - import photo's from thumbnailproperty in Active Directory

So let me start by describing an environment:


  • SharePoint 2013 Standard or Enterprise
  • Active Directory
  • Employee Pictures embedded into thumbnailPhoto attribute


You go and install your fancy new SharePoint 2013 environment, you setup User Profile Services using the new Active Directory Import and you go to your mysites to notice no employee pictures.  Good news you aren't alone.  I had this happen too - read below on how I fixed this problem.

It seems the Picture field doesn't map to any attribute field by default in SharePoint 2013.  So to start out you need to fix that.  Head over to Central Admin.  Now Click on Manage service applications under Application Management.




Select your User Profile Service application you have listed.  Note the name could be different depending if you created it yourself or let the wizard create it for you.  Now head over to the Manage User Properties link under the People group.












Scroll down to the Picture attribute.  You should note it's currently set to the URL Property Type, yet the Mapped Attribute column is blank.  Click on the word Picture and select Edit from the menu.  The Edit User Profile Properties window will appear.




Scroll to the bottom to Add New Mapping section.  In the Atribute pull down menu select thumbnailPhoto.  Next click the Add button.  After clicking the Add button, you can see the listing of your new mapping under the Property Mapping for Synchronization section.

Now you can click the OK button.  NOTE YOU MUST CLICK THE ADD BUTTON BEFORE THE OK BUTTON.


Your mapping should properly show up on the Manage User Properties page.



Not done yet.  Now you  need to do a Full Synchronization of all users.  You can do that from the Start Profile Sync link under the main Manage Profile Service page in the Synchronization section.  Note if you don't do a full sync once this trick doesn't work.

After you've done the full sync you still don't have pictures.  What gives?  Well you need to run a Powershell script to tell SharePoint to create the images from the thumbnails embedded into Active Directory.  Open up your SharePoint 2013 Management Shell (Powershell).  The Syntax is:

Update-SpProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://enteryourmysiteurl

Note you MUST change the URL to your mysite host URL for this to work.  Here is a screen shot of mine where the mysite URL is http://mysp/:






Note you will need to schedule this Powershell script as a Task so that you run this after any time you run your User Profile Service Sync.


You should be able to go to your mysite and see employee pictures...


4 comments:

Sylvain said...

Hi,
Are you sure you are using the last ? :
In my view you are using this :
Use SharePoint Profile Synchronization that use FIM

Instead of this :
Use SharePoint Active Directory Import

is it ?
Thanks for you answer
Sylvain

Hayden Hancock said...

He's using SharePoint Profile Synchronization and not SharePoint Active Directory Import. I still haven't been able to get the SharePoint Active Directory Import to work with profile pictures. I am not sure what is going on.

wyefye said...

fyi, hayden, i talked to MS. they said that AD import does NOT support photo sync, and you must use sharepoint sync. end of story.

Fennycia Lim said...

jago bangkok