Requirements:
- SharePoint Server 2010 with the
October Cumulative Update installed(**UPDATE** SP2010 SP1 with at least Feb 2012 CU) - Successfully working User Profile Service Application
- Profile Photo stored in thumbnailPhoto AD attribute (I used the PowerShell script found here to import the picture into the attribute)
Steps to Perform:
- Create an import PictureURL mapping
- Perform a full profile synchronization
- Run the Update-SPProfilePhotoStore PowerShell command
Create an import PictureURL mapping
Edit the User Profile Picture property by navigating to Manage Service Applications > User Profile Service Application > Manage User Properties > Picture

Make sure your Active Directory profile connection is selected, and then choose the thumbnailPhoto attribute and Import direction

Since you’ll be controlling the profile photos from Active Directory, change Edit Settings to “Do not allow users to edit values for this property”

Click OK to make the changes
Perform a full profile synchronization
Manage Service Applications > User Profile Service Application > Start Profile Synchronization

The synchronization may take a while, so be patient.
Once completed, if you go to the profile page you’ll notice that the image wasn’t added.

Run Update-SPProfilePhotoStore PowerShell Command
Launch the SharePoint 2010 Management Shell (Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell) and run the following command:
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation
http://<YourServerName>/my

Now go back to the profile page to review the results


Pingback: Import User Profile Photos from Active Directory into SharePoint 2010 « SP2010 Blog
Adam.
I’ve been tried for hours and it does not seem to work.
Can you be able to post exact codes for this step?
■Profile Photo stored in thumbnailPhoto AD attribute (I used the PowerShell script found here to import the picture into the attribute)
Thanks.
Dan,
Unfortunately, that is not my code from that link and there are many variables that go into it (image size, domain location, etc). I would post your question(s) in getting the image added to AD to that forum post for assistance.
Thanks,
Adam
Hi Adam,
I can see the imported pictures in the User Profile Photo Library under MySiteHost with all the different sizes as they should have to be there.
But on my profile page instead of my profile photo I can see a RED cross User Photo (BTW if I right click and check the properties of that icon it is pointing to the right Image, but simply don’t display it).
The only different is that I have installed December 2010 CU for SharePoint instead of October one, any thoughts?
Hi Adam,
Is there any requirements about version of Active Directory?
In my case it doesn’t work in my case!
I have followed the steps
Is there another script to provision the picture that is used on the profile page the small thumb is working but the Medium and Large Thumb do not.
I can see the imported pictures in the User Profile Photo Library under MySiteHost with all the different sizes as they should have to be there.
When I click on the SThumb pic it displays in the browser but the MThumb and LThumb do not dispay in the browser or on the profile page in mysites I get the broken image icon.
But on my profile page instead of my profile photo I can see a RED cross User Photo (BTW if I right click and check the properties of that icon it is pointing to the right Image, but simply don’t display it).
Pingback: Problem synchronising thumbnails from ActiveDirectory in Sharepoint 2010 | This.Caes();
Adam,
The synchronization should copy the photos from AD into MySite/User Photos/Profile Pictures, right? I’m having trouble with that step, even after a full sync, no photos are copied over. Other AD properties are importing correctly. Any idea what might be causing this?
Works perfectly for me
Thanks a lot for this very clear article
Anthony,
Has said on my blog, maybe your Picture property is not correctly mapped on thumbnailPhoto as mentionned upper in this article
Caes
When i try to run the command it gives an error regarding the “-CreateThumbnailsForImportedPhotos 1″ , as it does not exist . If i run it without, it seems to run ok , but with no results regarding the thumbnails in the profiles.
@Andrei
Try running the command again using SharePoint 2010 Management Shell as the service account that runs the Profile Sync. I saw this listed on a site somewhere that someone had the same issue and resolved it that way.
Nope – command didnt work and running as service account that runs the Profile Sync didnt work either…
I had a situation with the same Red X. (I’ve seen this before with JPG’s in a picture library saved as CMYK and not RGB format)
The picture uploaded into AD was a PNG file, so we changed to a RBG JPG, stored it in AD, ran the UPS import, re-updated pictures with SP-UpdateProfilePhotoStore (running as the farm account) and voila! No more Red X
Pingback: Import User Profile Photos from Active Directory into SharePoint 2010 « Heavenly Dogs
Pingback: ort User Profile Photos from Active Directory into SharePoint 2010 « SharePoint database
Hello, I have executed the procedure and picture still shows X mark. If I verify the PictureURL properties, it is pointing now to http://mydomain.com/_layouts/images/O14_person_placeHolder_192.png
I am unabl to run the script as well.
Update-SPProfilePhotoStore : A parameter cannot be found that matches parameter
name ‘CreateThumbnailsForImportedPhotos’.
At line:1 char:62
Please help.
“Shrig”
Is is possible that you are not running the Shell as Admin ?
I’m getting an “mv-constrain-violation” in FIM during the sync on the “thumbnailPhoto attribute. I tried resizing the photos in AD down as small as 96×96 but they’re still not syncing from AD into SP. Any idea? Thanks!
Thanks for sharing this.
We have a web-part that allows users to change their Active Directory and/or SharePoint profile photos on their own. Along with other AD attributes like phone numbers, addresses, etc. Take a look: http://www.harepoint.com/Products/HarePointSelfService/Default.aspx
Great Post,
Thanks so much for sharing this….
“Make sure your Active Directory profile connection is selected, and then choose the thumbnailPhoto attribute and Import direction”
then click Add!!!! ‘Ok’ does not update the connection! Click Add and then Ok!!!!
Hi,
Thanks Guys. We are having a FBA based site. It looks like update command works well when my sync connection is windows based and claimsuseridentifer is not mapped.
In our case we need the conn to be forms based and claims user identifier – > samAccountName.
” Error processing the photo URL User Photos/Profile
Pictures/0c37852b-34d0-418e-91c6-2ac25af4be5b_156.jpg for user i:0#.f|ad|……
: System.UriFormatException: Invalid URI: A Dos path must be rooted, for
example, ‘c:\’.”
Any help will be useful
Excellent post!!!
I would like to add further info, regard permissions running Update-SPProfilePhotoStore cmdlet…
I got an error when running it: “Object reference not set to an instance of an object”.
According Technet, the user must be “a site collection administrator for the My Site host, and you must be a User Profile service application administrator with the Manage Profiles permission”
I gave myself permission (Full Control) on User Profile Service, run it again to work… (got from here: http://donalconlon.wordpress.com/2011/03/08/problem-running-update-spprofilephotostore/)
Regards.
Marcelo
Thanks, Marcelo. Glad you found it to be helpful!
Finally!! After lots of headache, I got the profile pic to display from AD!! The Feb 2012 cumulative update made it work for me.
Thanks for the post!!
C
Very welcome, Candice. Yes, SharePoint should partner with Advil to assist with those headaches.
I just installed February CU 2012 and as the farm admin ran the command successfully. All the beautiful pictures are now there.
If you can’t get it to work, it’s most likely permissions. Marcelo had a good post and link to an article with permissions to check.
Thanks Adam!
We had an incorrect picture for a user so we deleted the picture from the AD thumbnailphoto property but the picture synch with SharePoint doesn’t clear the photo. We still see the old photo in SharePoint. Is that as designed or is there a way to clear it?