To resolve this issue please follow the below steps:
1. Run Windows PowerShell as Administrator
2. Run the following cmdlets to connect PowerShell to
Exchange Online:
a. Set-ExecutionPolicy
RemoteSigned
b. $LiveCred
= Get-Credential
c. $Session
= New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUrips.outlook.com/powershell -Credential
$LiveCred -Authentication Basic –AllowRedirection
d. Import-PSSession
$session
3. Run command to upload and change the photo. Please change
the marked part to match your system.
Set-UserPhoto <Admin> -PictureData
([System.IO.File]::ReadAllBytes("C:\Admin.jpg")) -identity id@domain.onmicrosoft.com
4. Run following command to retrieve the RBAC version of
your tenant. It is a potential cause of this problem
Get-OrganizationConfig
| fl RBACConfigurationVersion
I understand it is only a workaround, not the solution. The
result of the last command will help to address the root cause. So please try
all these steps and let me know the result.
Reference: