SharePoint 2010 Profile Picture Property 101


I recently had a couple of questions around the (oob) profile picture property and thought it would be good to share a couple of things I discovered with it. As you may already know, a User Profile Service Application contains a manage user properties page in which you can map properties to/from Active Directory or other external directory server.


 


clip_image001


 


I’ll use Active Directory since it will be the most common type of server used. What is the benefit of storing pictures in Active Directory? Well, the new Outlook social connector will pull from what is stored in the thumbnailPhoto attribute so a picture of a sender is visible in email. SharePoint 2010 will sync users pictures directly to the thumbnailPhoto attribute.


 


The flow looks like this:


1.) User, Jon, logs into their SharePoint 2010 profile page and uploads a picture


2.) SharePoint administrator creates a mapping within the picture property which exports photo to AD


· Where exactly? Central Administrator\Manage Service Applications\User Profile Service Application\Manage User Properties page



clip_image003


3.) SharePoint administrator kicks off an incremental sync


4.) Jon launches Outlook and sends an email to Colin


5.) Colin opens Jon’s email and Jon’s picture is present



 


Question:


I already store pictures in Active Directory via the thumbnailphoto attribute. I would rather set my mapping to import and sync pictures from AD to SharePoint.



Answer:


The direction must be set to Export when syncing against the thumbnailphoto attribute. It’s possible to set a mapping as import but this particular mapping will not work against this attribute.


From the following:


http://technet.microsoft.com/en-us/library/ff182925(office.14).aspx


“In order to synchronize user profile pictures between Microsoft SharePoint Server, AD DS, and Outlook 2010 by using the Microsoft Outlook Social Connector, you must set the Data Source Connection for the Picture property mapping to Export. “





 


Question:


Why is import available has an option when creating a mapping of the picture property?


Answer:


I believe the import direction has some benefit. I haven’t tested this but the rule of thumb is the attributes you map to should be the same type. With that said, the picture property is of type URL so I “think” you should be able to create an import mapping as long as the attribute is of type URL. I don’t see any benefit doing it this way if your syncing against Active Directory. I believe this approach will probably be more adopted when your directory server is 3rd party. If anyone has it working this way, please post comment to this blog because I’m curious how it worked for you..



 


Thanks,


Russmax, MSFT


Comments (25)

  1. Manoj says:

    Hi,

    Thank you Russmax for sharing the tip. I am facing a problem with displaying images in the email which is located in the _layouts/images folder. When the user is opening the email in outlook, only the red color X symbol appears on the email rather than the image. But when the same email is opened using outlook web, the image shows up in the email. Could you please throw some light on how to embed the image so that it gets displayed in the outlook preview pane as well?

    Thanks,

    Manoj

  2. Russ Maxwell says:

    Hey Manoj,

    The symptoms you describe sound like it’s a problem with Outlook..  What version/build is Outlook at?  I’m not an Outlook expert but I assume if you can see it in outlook web access, then we have either a config issue with Outlook social connector or perhaps it’s a known issue with the build of Outlook your running.

  3. mcodyw says:

    I’m searching high and low to see if the Office Communicator Team will be implementing the same/similar connector to Exchange or Active Directory to get the photo, but I can’t find anything.  Any idea if Office Communicator will have that same photo functionality as Outlook?

  4. mcodyw says:

    Question regarding the size of the photo:  According to http://msexchangeteam.com/archive/2010/03/10/454223.aspx the size of the photo can be no larger than 10K, which is 96 x 96 pixels.  According to http://www.learninggateway.net/blogs/ajp/archive/2010/03/25/sharepoint-2010-where-do-my-user-profile-photos-go.aspx a 96×96 image is automatically created when a photo is uploaded to the profile in SharePoint.  

    Is it that 96 x 96 pixel image that is the one linked using hex in AD and Exchange?  

    Thanks!

  5. Russ Maxwell says:

    Yes you are correct.  

  6. gpnash says:

    since it’s a lot easier for me to update AD than to update the sharepoint database and we don’t want our users changing their picture I suppose this will work?

    we have our employee pictures stored on a web server.

    so I put the URL in an otherwise unused field in AD.

    Set sharepoint to import that to picture and export thumbnailphoto.

    really wish we could just import thumbnailphoto to sharepoint 🙁

  7. gpnash says:

    Guess I’ve had worse ideas.

    Looks like you can’t set the picture at all from AD.

    the only option is exporting the thumbnailphoto.

    very, very short sighted on someones part.

    back to the drawing board.

  8. Russ Maxwell says:

    Your response is the exact reason for this blog post.  

  9. gpnash says:

    I must say that at first blush I’m speechless.

    with sharepoint 2007 (MOSS) and 200000 or so AD entries I could define who to include or not include with a simple ldap filter and it took at most 20 minutes.  With Sharepoint 2010 I can’t duplicate it, I include everyone and exclude those without an employeeid or those that are disabled, but I used to do more than that.  Sharepoint 2010 has taken three days and is still not finished with the load; and I’ve yet to add pictures!  Someone really missed the boat with this one.

  10. gpnash says:

    Yep, 200000 users in 20 minutes on my real machine. When I went virtual (three days ago) it changed to 61 minutes. I’ve sent you the specifics.

  11. RIchardMarriner says:

    I posted this on MSDN and thought you could help.

    (Note we don’t have Exchange at our company yet and don’t use the Thumbnail property in AD – we use the extensionAttribute1 property to store a URL)

    —————–

    I’ve setup the User Profile Service and synchronisation with AD works fine. Except for the Picture property. Our sys admins have setup the URL to the staff picture to be in extensionAttribute1 in AD, I can’t change this, but I could map to it easily in MOSS 2007.

    In SP 2010, I click on the "Picture" property in Edit User profile property, then click on the "Attribute" drop down list in the "Add New Mapping" Section. This list only contains a limited number of attributes and does not contain any extensionAttributes. Most other User Properties seem to have a full list of AD attributes to choose from, but not "Picture". Why??????

    It seems very strange that extensionAttibute1 shows up in all the other property pages I have tried, even ones of type "URL".

    Any tips would br GREATLY appreciated!!

    thanks.

  12. Erik says:

    We followed these instructions, but the thumbnailphoto attribute doesn’t get updated.  We picked a different profile property to export to active directory, which worked, so it’s not a permission problem.  This is the MSDN SP 2010 version.  In the Forefront interface I see the attribute SPS_MV_OctetString_PictureURL mapped to thumbnailPhoto, as expected.  Are there any logs we can use to track problems from this picture URL export setting?

  13. Russ Maxwell says:

    Hey Richard,

    This has been a common request but unfortunately the extension attributes are not available at RTM.  I’m hoping this changes but for now it’s not possible.  I wish I had a better answer for you..

    Thanks,

    Russ

  14. Darrin Dyson says:

    Why can’t you import a picture into the PictureURL property from a BCS connection?  The attributes aren’t available when you select a BCS connection.  I’m not getting how your supposed to get this to work other than someone manually uploading a picture which defeats the purpose of syncing with either LOB data or another datasource.  I just don’t understand why this needed to be "fixed".  It just worked in MOSS 2007 without all of these shenanigans and now it’s ridiculously complex to get this to work.  I just don’t get it.

  15. bcweb says:

    Richard

    I have exactly the same issue as you. In Sharepoint 2007 I could change the Picture property to my ad user field which links to a separate server for storage of the photos: http://server/staffphotos/userid.jpg

    Because not all ad values are available for the picture property this is no longer possible. I even tried creating a custom Picture property which works ok but only as a link to the image. There doesn't appear to be any way of over riding the existing one. Don't you just hate it when a new version takes away useful functionality?

    Bob

  16. EmilyBen says:

    I can't seem to get the property to update AD.   It finishes with no errors but no image is stored in the thumbnailphoto attribute in AD.    But if I manually update the thumbnailphoto attribute in AD the next time the profile sync runs it overwrites the value in AD.     Any ideas what is wrong with my configuration.

    I am using the default Picture Property mapping to thumbnailPhoto with the export turned on.  

  17. Brian says:

    I soooo want this to work, but not sure why it is not or where to troubleshoot. The sync is 'sort of working' because if I manually upload a photo to the attribute the sync wipes it out, but it never correctly loads the SP picture property – why? 🙁

  18. Neel0 says:

    my sync with AD is working fine except it is not pulling the pictures in the AD.

    Here is my issue, we have photos of all employees stored as xyz.jpg in the custom attribute (emp_pics_2001) with type string, but the picture url type is url (is this the culprit type change), I am using the custom attribute to map the field in the Sharepoint 2010 miis client.

    I am using the below url to do the set up: goodbadtechnology.blogspot.com/…/setting-up-pictureurl-user-profile.html

    i did check the profile db picture url field is NULL, i have all the other values for person except the picture.. , I have already wasted more than 2 days in figuring this out

    If i just get xyz.jpg pulled to sharepoint, then i can prefix a url in front of it using powershell

    I am using a full trusted service account with full permissions to the domain

    please help me out..

    thank you

    Neel

  19. Peter Holpar says:

    Hi,

    I've created a simple visual web part to synchronize user profile photo export and import to and from the thumbnailPhoto Active Directory property:

    Synchronizing user image between Active Directory and SharePoint profile

    pholpar.wordpress.com/…/synchronizing-user-image-between-active-directory-and-sharepoint-profile

    I'm planning to create a timer job that does all these things (both export and import) as my time allows that. I'll update you about the results.

    Peter

  20. Sync User Profiles Picture URL with Active Directory images (thumbnailPhoto / jpegPhoto) -- Kent A. says:

    Importing AD thumbnailPhoto to SharePoint 2010 User Profiles PictureURL property: for those who need a command-line, sync-all batch solution, we wrote a free tool for this, no license or registering needed, source code on request. Since I came across this article when I researched into this issue, I felt I should share this here too:

    roxority.com/…/sync-user-profiles-picture-url-with-active-directory-images.html

  21. Adam Preston says:

    This is now fixed with the latest SP2010 Oct CU release. You can now successfully import the photos from AD and the thumbnailPhoto attribute. Check this out for details: sptwentyten.wordpress.com/…/import-user-profile-photos-from-active-directory-into-sharepoint-2010

  22. Mark says:

    In step #2 the field we use in AD holding the URL to a staff picture, the attributes list is extremely short, its missing all of the Exchange Custom Attribute #1-10.  Do you know why that is?

    If I create a new profile property called "Picture 2" and go to the attribute mapping section, I can see all AD attributes, including the one with the URL in it, called extensionAttribute1, but I don't know why its missing from "Picture".

    Any clues?

  23. Peter Holpar says:

    Hi,

    Although I promised to update you about my work on timer job based AD – SharePoint user profile photo sync, I simply forgot that.

    So you can find the post here (including the link to the source code):

    Creating a timer job for Active Directory – SharePoint profile user image synchronization

    pholpar.wordpress.com/…/creating-a-timer-job-for-active-directory-sharepoint-profile-user-image-synchronization

    Peter

  24. Jon, Sheffield says:

    Hi,

    this might sound like a strange request, but the business have requested that the pictures stored on AD are not displayed on Outlook 2010 but are exported to SharePoint for out intranet org charts.

    is this possible to export the thumb nails to SharePoint but not outlook?

    thanks

    Jon

  25. Yeshil says:

    Hi,

    This is working in our environment and we can see the pictures in AD however there is one question that I would like to ask. When a user edit his pictrue and upload a new one, we have to run Full crawl instead of Incremental Crawl. Why is that for? Incremental crawl should work on uploading new pictures, isnt that correct?

    Thanks

    Yeshil