SharePoint – import a picture from AD for the user profile

Consider the following scenario.

 You have JPG pictures in AD, stored with the users thumbnailPhoto attribute.
 You try to import pictures for a user profile from the Active Directory thumbnailPhoto attribute,
 to store within the Picture attribute in Microsoft SharePoint Server 2010.

 You have set up an import Picture URL mapping.
 User Profile synch and mysites are configured and working fine.
 Then, you perform a full synchronization in the SharePoint server.

In this scenario, the pictures are NOT added to the user profile in the SharePoint server.
(easy test – look at your MySite and select My Profile – do you see the new picture?)


Note: You CAN use following SharePoint PowerShell cmdlet command to perform the import operation:
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation  (14.0.5128.5000)

You just map the thumbnailPhoto AD attribute with the Picture property in SharePoint, then run the sync, finally run the cmdlet.

create the Mapping in SP2010 or SP2013:
 go to Central Admin->Application Management->Manage Service Applications
 select your User Profile Service Application
 select the People->Manage User Properties tab
 in the left-hand column, look down and select the Picture property.
 edit this – down the bottom is ‘Add New Mapping’ and via the dropdown on Attribute, select thumbnailPhoto.
 it should then look like this:
   User Profile Synch Connection
go back to the Manage User Properties and you should now see
   Picture    URL   thumbnailPhoto

OK, so now Synchronization->Start Profile Synchronization. Let that run through.
Next you will want to double-check your MySiteHostLocation.
select My Site Settings->Setup My Sites
grab the entry from My Site Host Location – that is what we need for the MySiteLocation parameter.

so, on the SharePoint box, launch a SharePoint PowerShell, (run as administrator).
the command will be as per below, with your path replacing “Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation

Comments (28)

  1. Anonymous says:

    Good post.thanks.

  2. Anonymous says:

    Great post! I followed these steps and I can see user's pictures in People Search as well as in their profiles.

    The only point when I got error in PowerShell was that I was logged on with the 'Setup' account. Then I logged on with Farm admin account which had DBO permission on My Sites database and User Profile databases.



  3. Worked for me too!!!

  4. Anonymous says:

    Also, just to be clear, I did this in SharePoint 2013.

  5. hayden says:

    What if we are using another custom attribute that isn't showing in my data source to be able to map it. Can I do this through PowerShell?

  6. Fiona says:

    Is there anyway to import the pictures from AD without having to have MySites setup?

  7. Fiona says:

    Is there anyway to import the pictures from AD without having to have MySites setup?

  8. René says:


    I hope you can help me with this error:
    Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation
    Update-SPProfilePhotoStore : The pipeline has been stopped.
    At line:6 char:27
    + Update-SPProfilePhotoStore < <<< -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation
    + CategoryInfo : InvalidData: (Microsoft.Offic…ofilePhotoStore:SPCmdletUserProfilePhotoStore) [Update-SPProfilePhotoStore], PipelineStoppedException
    + FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.SPCmdletUserProfilePhotoStore

  9. René says:

    What Am I doing wrong?????

  10. Pierre Foraz says:

    Log on to the App server as the AppFabric Caching Service account and run the script. Should be ok.

  11. Betsy Ami says:

    I’d also like to know (like Fiona) if there is anyway to import the pictures from AD without having to have MySites setup? Thank you.

  12. Joe says:

    Same as Betsy and Fiona, can I import pictures from the AD without setting up MySites?

  13. Frank Ball says:

    I’ve seen several guides similar to this one, but they all indicate that I should have the “thumbnailPhoto” attribute available to select. When I scroll down to where it should be, all I see is a closed and narrow drop down that cannot be opened/selected from. I’ve tried simply typing in the attribute name in the text box that’s there and adding that mapping, but still no joy. I’m following all of the steps I’ve seen and am using the SharePoint Active Directory import. I’ve checked rights, I’ve ran the PS script, ran the sync, checked to make sure the attribute exists in AD and is being populated and I still can’t see the user pics. Can anyone point me to where I may be doing something wrong??

  14. Nick Rawlins says:

    Will this work with Office 365. We are trying to sync our AD thumbnail pictures.

  15. emo says:


    What could be the reason to not displaying my pictures in MySites or search, but when I hover the mouse over the profile-names I am able to see the picture I imported from AD, showing up in the pop-up.?

  16. Kara Mitchell says:

    Frank Ball, you want Phase 2 of

    I also had the same issue until I followed that guide.

  17. Sam Lin says:

    Hi Luke, just got a request to enable SPProfilePhotoStore, it’s helpful. Thanks!

  18. Wouter SVB says:

    I’m experiencing the same as Frank Ball. Following all the steps, but the "attribute" dropdown stays empty. I then type in thumbnailPhoto by hand, and I don’t see any pictures showing up.

    Is there *any* way to figure out if the binary value from AD is imported at all?

  19. Wouter SVB says:

    I have now pictures in my sharepoint, right from AM.

    What I had to do was to stop using Active Directory Import, and to start using SharePoint Profile Synchronization.

    I don’t know if and why this makes sense, but it did the job for me. The "attribute" dropdown was now also filled.

  20. uday says:

    I have Followed all the steps ,Ran the command successfully Still not able to see the images…..can any 1 help…?

  21. David Jenkins says:

    It worked!. I wonder now if I can reverse it and have users submit their own photos.

  22. Shruthi says:


    Profile pictures are not importing to sharepoint. I could see either cross mark or blank photo and also i could see only GUID’s in user photo list in my site host. I ran the full sync and also ran the update profile store command but still the same.

    Photos exists in sync database but not in profile database. Please help me in fixing this.

    Thanks in Advance.

  23. SP_guy says:

    will the profile sync process update a new/changed picture from ad…. or do we have to run the Update-SPProfilePhotoStore on a regular basis?

  24. Shruthi says:

    It was working fine but now its stopped getting the photo from AD and we ran the update-spprofilephotostore command.