MVP - Most Valuable Professional

Just can't get enough of IT

This blog is about mostly anything in IT. But the primary focuses are Microsoft technologies like Exchange Server, Microsoft 365, Microsoft Teams, and Cloud Security.

Set ThumbnailPhoto for Azure AD Guest Users

On June 3, 2019
0 Comment


When using this PowerShell script you can update the guest user's thumbnail photo to a photo that aligns with your company's corporate identity and compliance guidelines, and you do not have to rely on the Azure AD default photo.

  • This script sets the AzureADThumbnailPhoto for guest users to a photo provided as JPG or PNG file.
  • The photo file can be up to 100KB in size. This is currently not checked in the script.
  • You can either update a single guest user or all guest users.
  • When updating the user photo can choose to set the photo forcibly or only if there is no photo set.
  • The changes are written to a log file. The log file functions are part of the GlobalFunctions module.



# Set the photo ExternalUser.png for all guest users if no photo exists

.\Set-GuestUserPhoto.ps1 -FilePath D:\Photos\ExternalUser.png -GuestUsersToSelect All -UpdateMode SetIfNoPhotoExists

# Set the photo ExternalUser.png for guest user if no photo exists

.\Set-GuestUserPhoto.ps1 -FilePath D:\Photos\ExternalUser.png -GuestUsersToSelect Single -UserPrincipalName


Version History

  • 1.0, Initial community release





Comments are closed.

Showing 0 Comment