How to restore Photos in AD WhitePages after upgrading to a newer version of AD Self-Service Suite

AD Self-Service Suite version 3.2 and below stores the photo in the jpegPhoto Active Directory attribute when uploading a photo to a user. AD Self-Service Suite version 3.5 and above uses the thumbnailPhoto Active Directory attribute. This was a change in the base product and as such the newer versions cannot be changed back to use the jpegPhoto attribute.

You can use PowerShell to find everyone who has a photo uploaded and to copy it to the Active Directory attribute used in version 3.5 and above. Below are two scripts with a slight variation. The first would be used for testing as it targets a specific Active Directory account. The second will go through the entire Active Directory and will copy the jpegPhoto attribute to the thumbnailPhoto attribute for everyone in the domain and then cleans up the jpegPhoto attribute.

1. Before running we can see the contents of the jpegPhoto attribute in ADSI Edit:

2. Run the below PowerShell script that is targeting our specific user by the distinguished name that is bold red. You need to change this to a distinguished name for a valid user who has a value in jpegPhoto in your Active Directory. You can find the distinguished name in ADSI Edit in the distinguishedName attribute.

Get-ADUser -identity "CN=Aleisha Marcum,OU=Users,OU=Alabama,OU=Sites,DC=eidlab,DC=com" -Properties jpegPhoto, thumbnailPhoto |
Select-Object * | ForEach-Object {Set-ADObject -Identity $_.DistinguishedName -Replace @{thumbnailPhoto=$($_.jpegPhoto)} -Clear jpegphoto}

3. After running the above script notice the thumbnailPhoto attribute is the same value:

After testing and validating that the photo is now showing correctly for the one user that was targeted the following PowerShell script makes this change for everyone with a value for jpegPhoto:

Get-ADUser -LDAPFilter ‘(jpegPhoto=*)’ -Properties jpegPhoto, thumbnailPhoto |
Select-Object * | ForEach-Object {Set-ADObject -Identity $_.DistinguishedName -Replace @{thumbnailPhoto=$($_.jpegPhoto)} -Clear jpegphoto}

For more information on AD Self-Service Suite please see the documentation.

Please feel free to contact us by e-mail at or by phone at (877) 996-4276 (Option 2) if you have any questions or concerns regarding this guide.

Have more questions? Submit a request


Powered by Zendesk