logo
search
Others

Fix Set-UserPhoto Not Working for Microsoft 365 Synced Users

Olivia MillerOlivia Miller Oct 19, 2026 868 views

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.

Fix Set-UserPhoto Not Working for Microsoft 365 Synced Users
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.
Before you start

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.

Solution 1Recommended

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.

1
Connect to Exchange Online

Open PowerShell as an administrator and run the Connect-ExchangeOnline cmdlet using the current ExchangeOnlineManagement module to authenticate.

2
Read the Image Data

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").

3
Execute Set-UserPhoto

Run the cmdlet Set-UserPhoto -Identity "user@domain.com" -PictureData $photo to upload the new profile photo directly to Exchange Online.

4
Allow Time for Replication

Wait for the changes to cache and replicate across all Microsoft 365 services, which can take up to 72 hours.

Use Exchange Online PowerShell to Update the Photo
Authentication Method: Ensure you are using modern authentication methods, as legacy remote PowerShell using Basic authentication is obsolete in many environments.
Free Microsoft Office alternative

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.

Fully compatible with Microsoft Word, Excel, and PowerPoint files (.docx, .xlsx, .pptx)Lightweight installation that doesn't slow down your operating systemFamiliar tabbed user interface for quick adoptionBuilt-in PDF editing and conversion tools at no extra costFree to use for all essential daily document tasks
microsoft office alternative - wps office

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.