Friday, January 3, 2014

Importing and displaying user pictures from Active Directory into MySite Sharepoint

 Importing and displaying user pictures from Active Directory into MySite Sharepoint
Check this
http://www.sharepointdiary.com/2013/01/import-user-pictures-from-active-directory-to-sharepoint-2010-mysite.html

 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.

3 steps to do:
  • Create an import PictureURL mapping
  • Perform a full profile synchronization
  • Run the Update-SPProfilePhotoStore PowerShell command:
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://<YourServerName>/my

So after updating the pics in AD, you have to repeat the 2nd & the 3rd steps
-----

 You have set up an import Picture URL mapping.

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
   thumbnailPhoto
   Import
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 "http://<YourServerName>/my"

Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://<YourServerName>/my

Now, go back to your mysite, select your profile and... voila!!  the new picture has been pulled in from AD.
 Things that can go wrong:
  • Be on current Cumulative Updates. (Post Dec 2011 absolute minimum!)
  • User Profile Synch service has to be running/enabled/OK!
  •  Permissions:
    •  Service Applications->User Profile Service Application, click Permissions. 
          Add your account and check the Full Control checkbox.
    •  Service Applications->User Profile Service Application, click the Administrators
          Add your account there and check the Manage Profiles.
  • Site Collection Administrator for the My Site host
  • DBO access to the DB containing mysite host.
  • run powershell with 'Run as Administrator'

No comments:

Post a Comment

Thank you, we will reply soon.