When using this PowerShell script you can update the guest user's thumbnail photo to a photo that aligns with your company's CI and you do not have to rely on the Azure AD default photo.
This script set 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 JohnDoe@varunagroup.de if no photo exists
.\Set-GuestUserPhoto.ps1 -FilePath D:\Photos\ExternalUser.png -GuestUsersToSelect Single -UserPrincipalName JohnDoe@varunagroup.de