Setting profile picture sometimes results in picture rotating 90 degrees

Yves Rosius 0 Reputation points
2024-05-29T12:05:48.54+00:00

Problem:

When setting a user profile picture using Microsoft.Graph PowerShell module, the resulting profile picture will be sometimes rotated 90 degrees.

Actions taken:

  • Download picture from SharePoint Online library
  • Compress picture conform limitations
  • Set profile picture using
      Set-MgUserPhotoContent -UserId $Email -InFile $CompressedFile
    

Troubleshooting:

  • Issue also occurs when manually uploading the picture in Entra ID (GUI).
  • Changing resolution to a square picture helps
  • Using an online compression tool helps (not changing resolution)

The issue seems random. So, I would like to have a cause I can then work around.

Thanks!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,145 questions
0 comments No comments
{count} votes