They have an HR database which they use to store everything from employee details to security card information. For this reason they manage all of the employee photos here, and they are pushed into Active Directory (using the LDAP "jpegPhoto" attribute) to make them available in applications like Outlook.
So ... to put it quite simply .. they don't want to use SharePoint to upload their photos. In fact, they already have their photos in AD .. they just want to pull them into SharePoint 2010.
Can't we just map the Profile Property to AD and Import the value?
So here is where we hit the roadblock.. The Active Directory "jpegPhoto" attribute is of type "Binary Data" and the SharePoint 2010 User Profile property is of type HyperLink (as it typically links to an image in an Asset Library in the My Site Host site collection).
As a result, you cannot import it using SharePoint 2010 functionality (although it may be possible if you have also purchased the more sophisticated "ForeFront Identity Manager Synchronisation Server" product).
Well .. SharePoint IS used as a development platform so there are some options. Obviously there is a full API for reading and writing in and out of the User Profile database (some more accessible than others).
There are a few good blog articles that you can follow if you want to build your own import function. If you are happy to wait a while longer then I already have my own solution which I will be posting up with the following features:
UPDATE - Full Source code and WSP now published
* WSP Package
* Farm scoped feature, which installs a Timer Job attached to the MySite web application
* Iterates through all User Profiles, and finds and extracts Binary image data from Active Directory
* Automatically creates thumbnailed images in the My Site Host Asset Library
* Automatically updates User Profiles to point to those new images
During my research Glyn Clough also pointed me in the direction of another solution which allows you to do the same using a Console Application... personally I prefer the more "SharePoint" route of Timer Job and WSP package :)
In the meantime, you can feel free to avail yourselves of these posts:
- MSDN Blog - Background information on why you cannot import the property from AD directly
- Blog Post - How to upload a user profile photo programmatically
- Technet Blog - Programmatically using the jpegPhoto attribute in Active Directory