Fix Set-UserPhoto Not Working for Microsoft 365 Synced Users
Question details
The user is unable to update profile photos for Microsoft 365 users synchronized from an on-premises Active Directory using Set-UserPhoto or Set-AzureADUserThumbnailPhoto.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Trying to update or synchronize user profile photos from on-premises Active Directory to Microsoft Entra ID and Exchange Online.
- Observed behavior
- The Set-UserPhoto command fails to update the synced user's photo, primarily because Exchange Online becomes the source of authority for the attribute after the initial directory synchronization.
Ensure you have the appropriate Exchange Online and Active Directory administrative permissions, and verify that the new image meets Microsoft's size (under 100KB) and format (JPEG) requirements.
Use Exchange Online PowerShell to Update the Photo
Since Exchange Online becomes the source of authority for the thumbnailPhoto attribute after the initial sync, directly updating it in Exchange Online is the most reliable method.
According to Microsoft documentation, the thumbnailPhoto attribute is synchronized only once from Azure AD to Exchange Online. Subsequent changes from on-premises Active Directory cannot be synchronized automatically, requiring manual updates via Exchange Online PowerShell.
Open PowerShell as an administrator and run the Connect-ExchangeOnline cmdlet using the current ExchangeOnlineManagement module to authenticate.
Store the target image as a byte array into a variable using a command like $photo = [System.IO.File]::ReadAllBytes("C:\path\to\photo.jpg").
Run the cmdlet Set-UserPhoto -Identity "user@domain.com" -PictureData $photo to upload the new profile photo directly to Exchange Online.
Wait for the changes to cache and replicate across all Microsoft 365 services, which can take up to 72 hours.

Verify Microsoft Entra Connect Synchronization Configuration
Ensure that the thumbnailPhoto attribute is not being blocked or filtered out during the directory synchronization process.
Need a Lightweight Office Alternative? Try WPS Office
Managing backend Microsoft 365 synchronization rules can be complex, but managing your documents shouldn't be. WPS Office provides a free, lightweight, and powerful alternative to Microsoft Office, giving you a seamless experience without heavy administrative overhead.

Frequently Asked Questions
Why does the user photo only sync once from Active Directory?
By Microsoft's design, the thumbnailPhoto attribute synchronizes from Azure AD to Exchange Online only during the initial sync process. Once complete, Exchange Online assumes authority over the attribute, meaning subsequent changes in Active Directory won't overwrite the Exchange photo.
What are the image requirements for photos uploaded via Set-UserPhoto?
The image file should be a supported format, most commonly JPEG, and the file size is recommended to be kept under 100 KB to ensure seamless caching and synchronization across all Microsoft 365 applications.
Can I use Set-AzureADUserThumbnailPhoto instead of Set-UserPhoto?
While Set-AzureADUserThumbnailPhoto updates the photo within Microsoft Entra ID, it may not reflect in Exchange Online services if Exchange has already become the source of authority. Using Set-UserPhoto directly within Exchange Online PowerShell guarantees the update.
How long does it take for a new profile photo to appear across all Microsoft 365 apps?
Even after a successful PowerShell update, the new profile photo can take anywhere from 24 to 72 hours to fully cache and replicate across services like Microsoft Teams, Outlook, and SharePoint.




