Scenario
You would like to have user photos in your Exclaimer signatures, and you want to know how you can upload the photos to Microsoft 365.
Resolution
Please click on the required options listed below to go through the detailed description:
An Administrator uploads the user photos within the Microsoft 365 admin center
This option is suitable for Microsoft 365 Administrators to upload photos on behalf of their users.
With this solution, each user photo is uploaded individually, so this is best suited for small numbers of users.
With this solution, each user photo is uploaded individually, so this is best suited for small numbers of users.
NOTE: This solution is only suitable for users whose mailbox is located in Exchange Online.
- Navigate to the Microsoft 365 admin center.
- Navigate to Users > Active Users. Select the user whose user data you wish to edit.
The photo is displayed on the right-hand pane.
- Click the photo then select Choose photo.
- Select the photo you want to upload, then click Open.
- Click Save changes.
An Administrator uploads the user photos within the Microsoft Entra (Azure Active Directory) admin center
This option is suitable for users.
- Navigate to the Microsoft Entra admin center.
- Navigate to Azure Active Directory > Users > All users.
- Select the required user.
- Within the Overview section, the current user photo is displayed.
- Click on the camera icon.
- Either drag and drop the image file or select Browse for files.
- Select the photo you want to upload, then click Open.
- Click Upload.
Users upload their own photos in Outlook on the web (OWA)
This option is suitable for organizations that want users to upload their own photos to their profile. This may be useful for users who work remotely.
- Navigate to Outlook on the web.
- Select the Account manager button at the top-right of the page.
- Click on the user photo placeholder to add or change the picture.
- Select Upload a new photo.
- Select the photo you want to upload, then click Open.
- Click Apply.
An Administrator runs a Powershell script to bulk upload user photos
This option is suitable for Microsoft 365 Administrators who want to upload user photos in bulk. This is the best option where you need to upload lots of user photos.
NOTE: This solution is only suitable for users whose mailbox is located in Exchange Online.
- Create a directory of the required user photos with the filename format "<alias>.jpg" (any supported image format can be used).
where <alias> is the part of the user's email address before the @ symbol.
For example:
- Copy the following code into your code editor (example, Visual Studio Code).
.SYNOPSIS
Script to upload user photos to Exchange Online
.DESCRIPTION
This script is designed to be run by an Exchange Online administrator to upload multiple user's photos to be used with Exclaimer's Enable Azure AD User Photos feature.
.NOTES
Date: 30th May 2023
.PRODUCTS
Exclaimer
.REQUIREMENTS
ExchangeOnline Powershell module.
.USAGE
Save user photos in a directory with the user's alias as the file name.
Set the $path and $imageformat variables below.
The script will list any missing files.
#>
Connect-ExchangeOnline
$path = 'C:\Temp\UserPhotos\'
$imageformat = '.jpg'
Get-Mailbox | ForEach-Object {
$userpath = $path+$_.alias+$imageformat
try {
Set-UserPhoto -identity $_.alias -PictureData ([System.IO.File]::ReadAllBytes($userpath)) -Confirm:$false
}
catch [System.Management.Automation.MethodInvocationException]{
"Could not find $userpath"
}
} - As required, change the value of the variables $path and $imageformat.
- Save the script as a Powershell (.ps1) file.
- Run the script directly from your code editor (if supported) or else right-click the .ps1 file and then select Run with Powershell.
NOTE: The photo will be updated on their user profile if a matching user photo file exists. If a matching user photo file is not found by the script, no changes will be made for that user.