In Exchange Online, pictures are stored in two locations, as follows:
- In the ThumbnailPhoto attribute in AD DS
- In the top level of the user's mailbox
If there's a photo in the user's mailbox, it will be displayed in OWA, the Exchange address book, and the
Get-UserPhoto cmdlet. The
ThumbnailPhoto attribute in AD DS won’t be used.
If you want the Active Directory attribute to be displayed instead of the photo that was uploaded directly to the mailbox, follow these steps:
- Remove the photos. To do this, run the following cmdlet:
Remove-UserPhoto <userUPN> -ClearMailboxPhotoRecord
Note This step removes all photos from the Exchange Online user object. This includes the one that's stored in the mailbox and in the AD DS attribute, ThumbnailPhoto.
Note The -ClearMailboxPhotoRecord switch is required for an Active Directory photo to be used.
- In the on-premises AD DS, clear the ThumbnailPhoto attribute for the user.
- Start AD DS replication to Azure.
- Upload the photo to the on-premises AD DS ThumbnailPhoto attribute. This should trigger a new dirsync operation to send the photo to the Azure account, which will forwardsync the photo to the Exchange Online object. By starting AD DS replication to Azure, you may speed up this process.