none
User Profile Service Import User Pictures from AD RRS feed

  • Question

  • Hi,

    Let me brief about the Setup:

    1. Sharepoint Server 2010 with Feb'12 CU installed. (No Service Pack 1 installed actually)

    2. AD Import thumbnail photo Connection has been set on User Profile Service.

    3. Mysite Host Location: http://servername/my/mysite

    4. All the pictures (128x128 in size) are imported from AD successfully, I can see those under MySite's User Photos Picture Library

    I'm currently looking at the article http://sharepointadam.com/2010/11/18/import-user-profile-photos-from-active-directory-into-sharepoint-2010/ to acheive this.

    Trying Update-SPProfilePhotoStore .... command, but gettting error "Object reference not set to an instance of an object".

    1. Can someone confirm, if the Service Pack 1 is must for this feature to work properly or are there any alternate fix for the import to display user pictures.

    2. Has anyone tested the steps mentioned in the above article? If the procedure works, then I need to schedule maintenance window with our Business Units.

    Please let me know your thoughts.

    Thanks!


    Uman Ahmed

    Wednesday, March 6, 2013 11:15 AM

Answers

  • Requirements:

    • SharePoint Server 2010 with the 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

      Refer to : http://www.tcscblog.com/2010/11/18/import-user-profile-photos-from-active-directory-into-sharepoint-2010/


    Wednesday, March 13, 2013 11:37 AM

All replies

  • To add to this, I have tried running the above powershell command with UPS service account, but still the same error.

    Uman Ahmed

    Wednesday, March 6, 2013 11:16 AM
  • There were a lot of issues with the UPS in early versions of SharePoint. You shouldn't be doing anything with a version before SP1 anymore (unless your production farm hasn't been upgraded, in which case you should upgrade your production farm).

    Spence Harbar has the definitive posts on this topic. From memory you'll want SP1 and at least the first CU to get the photos working.

    Short version: Install SP1 and try again. It is a must. The CUs may or may not be required but the UPS got a lot of improvement even after SP1 so Feb 2012 CU may be requried.

    Wednesday, March 6, 2013 11:25 AM
  • Alex - thanks for the quick response.

    I followed the above specified article, now I'm seeing this issue: On User profile, getting red X with text 'User Photo'. If I right click on the red cross and go to properties, then the photo url is missing a '/'  as below: Please see the part mysiteUserxxxxxx of the URL. There is a / missing.

    wrong url: http://servername/my/mysiteUser%20Photos/Profile%20Pictures/Username_LThumb.jpg

    the url should be: http://servername/my/mysite/User%20Photos/Profile%20Pictures/Username_LThumb.jpg

    1. Do you think this would be fixed by installing Service Pack 1 (as we already have Feb 12 CU)?

    2. Will the workaround 3 mentioned in this http://blogs.technet.com/b/harmeetw/archive/2012/09/18/sharepoint-2010-profile-pictures-not-showing-up-due-to-incorrect-url.aspx can permanently fix the / issue ?

    How do I update the PictureURL to the correct URL.

    Rebuilding the UPS is not an option for me :(

    Thanks!


    Uman Ahmed

    Wednesday, March 6, 2013 1:28 PM
  • It shouldn't be possible to install the 2012 Feb CU without SP1. Can you go into Central Admin and give us your version number?
    Wednesday, March 6, 2013 2:09 PM
  • Under Manager Servers in the farm:

    Configuration database version: 14.0.6117.5002

    Under Check Product and Patch Installation Status:

    Thank You!


    Uman Ahmed

    Wednesday, March 6, 2013 2:17 PM
  • Hi,

    Any suggestion about the solution to fix the missing / issue for the user photos URL?

    Please advise.

    Regards!


    Uman Ahmed

    Wednesday, March 6, 2013 7:20 PM
  • Can someone help me out with the Picture URL issue.

    I think most of the admins would have faced similar issue with the Picture URL.

    Please advise!


    Uman Ahmed

    Friday, March 8, 2013 8:14 AM
  • Requirements:

    • SharePoint Server 2010 with the 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

      Refer to : http://www.tcscblog.com/2010/11/18/import-user-profile-photos-from-active-directory-into-sharepoint-2010/


    Wednesday, March 13, 2013 11:37 AM
  • Hi,

    I could import the pictures and also got the tumbnails created. But, facing the below problem:

    Actual URL of the picture is http://servername/my/mysite/User%20Photos/Profile%20Pictures/UserName_LThumb.jpg

    But, when I access My Site -> My Profile page, the picture URL is missing / (forward slash is missing after mysite check below) .

    Its showing as http://servername/my/mysiteUser%20Photos/Profile%20Pictures/UserName_LThumb.jpg

    I need help in fixing the missing /  Due to this missing / the photo is not displaying.

    Please advise guys.

    Just FYI, MySiteHostLocation is: http://servername/my/mysite/ as seen on Setup My Sites section of User Profile Service.


    Uman Ahmed

    Sunday, March 24, 2013 12:22 PM