Answered Exporting Photos From SharePoint To AD Not Working

  • giovedì 10 maggio 2012 15:05
     
     

    We recently had to rebuild our User Profile Application.  When we rebuilt it we used the old ProfileDB to restore from.  Before this we had no problems, the user photos would all export to AD just fine.  However after rebuilding and running a full sync it removed all user photos from AD and I cannot get them to reimport.

    It will import new users photos into AD, but any user that was there prior to the rebuild their photo has been removed from AD and I cannot get sync to push them back.

    When I run a full sync I can watch the process with the miisclient. During the MOSS_FULLIMPORT step I can see the PictureURL Property and it has the binary value, but it is marked as delete.  I don't understand what all the steps are doing, but I would think it should be marked as add.

    Does anyone have any ideas why it wont sync the old users photos?

Tutte le risposte

  • giovedì 10 maggio 2012 20:34
     
      Contiene codice

    have you already tried regenerated the thumbnail photos?

    Update-SPProfilePhotoStore -MySiteHostLocation http://mysite -CreateThumbnailsForImportedPhotos $true

    Granted, this is if you're upgrading from 2007 to 2010, but I've found it tends to fix other issues w/ photos as well and "resets" to a nice baseline, especially if you've already got the new photos syncing to AD correctly and it's just old photo issues.

  • venerdì 11 maggio 2012 01:09
     
     

    Thanks for the reply,

    I have not tried that, but let me explain a little more about our process.  We currently store all our photo in another database for our badges.  I wrote a timer job that grabs a photo, resizes it to three different sizes large, meduim, and small, and adds them to the profile pictures library. It then updates that user profile URL property and points it to the medium sized picture. 

    From my understanding of command you mentioned, it is used when you import a picture to SharePoint it then generates the three photos and sets the Picture URL property. 

    I am thinking there is something in the UserProfile database of the Sync Database that has the photo mark as already being exported so it is not exporting it again.  I have tried removing photos and re-adding them, but they still don't get exported.

    I think our next step is going to reset the sync database, but I am not sure if that will help.

  • martedì 15 maggio 2012 14:25
     
     Con risposta

    Just wanted to update this thread.  Resetting the User Sync Database fixed the issue and after a little research I think I figured out what happened.

    When I rebuilt the Sync for the first time I added my connection to AD then mapped all my properties including the photos and then ran a full sync.  What I didn't know at the time, is the first time you run a full sync, it skips a step and doesn't import the information from SharePoint.  So when it came time to export the photos there were none in the metaverse so it removed them from AD.  Any attempts to get it to push the photos after that I could not get to work.

    So this time after I reset the sync DB following the steps outlined here: http://technet.microsoft.com/en-us/library/ff681014.aspx#resetSync 

    I ran two full syncs and then mapped my properties back.  Then ran another full sync and everything seems to be working correctly again.

    Matt