O365 / Teams - Adding Photos Not Working in Teams Only

Hey all, I’m a MS Teams admin and need some help with removing and adding a photo for end users display pics via PowerShell.

I can remove them and I can add a new photo for everything O365 except Microsoft Teams. Microsoft Teams on the other hand will only remove the display pic but won’t add the new one.

$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection
Import-PSSession $exchangeSession
Get-UserPhoto -Identity user@domain.com.au
Remove-UserPhoto -Identity user@domain.com.au
Set-UserPhoto -Identity "user@domain.com.au" -PictureData ([System.IO.File]::ReadAllBytes("C:\Users\user\desktop\photo.jpg")) 
Set-UserPhoto -Identity "user@domain.com.au" -PictureData ([System.IO.File]::ReadAllBytes("C:\Users\user\desktop\photo.jpg")) -Preview

Have you checked on Teams online vs a desktop client. There are couple of things in here that you can check such as mail policies and clearing the desktop cache.

Teams profile photos replaced by placeholder? - Microsoft Tech Community

Hey Rob,

Thank you for the reply. Looking at a link on there and speaking to one of our third party services, it looks like it’s due to us being “Exchange Online Dedicated – Legacy (Sync to Azure AD required)” which doesn’t support the Modify user profile picture.

I’ve checked the online vs the desktop client and clearing the cache which update the photo so it looks like this one is going to be as good as flogging a dead horse for now.

Thank you.