
Getting a user’s Microsoft 365 profile photo in Power Automate sounds simple until you try choosing the size. A recent forum question "How can I get a user’s profile photo, and can I choose the size?" revealed that there is more to it than expected.
In this post, we’ll look at:
- How to Get a User’s Profile Photo
- Which Profile Photo Sizes are Available?
- How to Get Profile Photos in Other Sizes
- Low-Resolution Uploads Can Lead to Blurry Profile Photos
- What to Do When a User Doesn’t Have a Profile Photo?
- Conclusion
How to Get a User’s Profile Photo
We can use the built-in “Get user photo (V2)” action in Power Automate to get a user’s photo.
The “Get user photo (V2)” action retrieves a user’s profile photo.
In the example below, I retrieved the profile photo for Alex using his username (email address) and then saved it to OneDrive:
Flow using “Get user photo (V2)” to create an image file in OneDrive from the Image file content property.
Here we see Alex’s photo that I saved to OneDrive:
Profile photo saved as alex.jpg in OneDrive.
However, the “Get user photo (V2)” action always returns a default-sized image and it does not give you the option to choose another size.
Which Profile Photo Sizes are Available?
Profile photos are available in different sizes, ranging from 48×48 up to 648×648.
Microsoft 365 stores multiple profile photo sizes to support different apps and screen resolutions. The Get user photo (V2) will always return the default size of a user’s Microsoft 365 profile photo, which is the same size as the image that was uploaded to Microsoft 365.
However, Microsoft 365 also stores the profile photo in multiple standard sizes, ranging from 48×48 up to 648×648.
48×48 |
64×64 |
96×96 |
120×120 |
240×240 |
360×360 |
432×432 |
504×504 |
648×648 |
I used the Office 365 Send an HTTP Request action to retrieve a list of available profile photos sizes. The Office 365 Send an HTTP Request connector is included with standard licensing, so there is no extra cost to use it.
The following steps aren’t required for the flow itself, but if you are interested in how to discover a list of available profile photos sizes, read on.
(1) Add the Office 365 Send an HTTP Request action
Select the ‘Send an HTTP Request’ action from the Office 365 Users connector in Power Automate.
The Office 365 – Send an HTTP request action was added to the flow.We will use the following uri (URI) with the GET method to retrieve a list of available profile photos sizes:
URI to list all available profile photo sizes for a user.
The uri is simply the web link that tells the flow where to get or send information. For example, for “Alex@company.com”, the URI would be:
Example URI to list all available profile photo sizes for a specific user.(3) Use the GET method with this URI in the Send an HTTP Request action.
Use the GET method with the URI in the Send an HTTP request to list all available photo sizes.(4) Check the runtime output of the flow
When I examine the runtime output of the Office 365 Send an HTTP Request action, it shows the height and width for each of the available photo sizes:
Runtime output showing a list of available photo sizes such as 48×48, 64×64, 96×96, and 120×120.
Note the id
property in the runtime output. This value is used to choose the size of the photo you want:
The runtime output showing available profile photo sizes retrieved with Send an HTTP request.How to Get Profile Photos in Other Sizes
We will use the Office 365 Send an HTTP Request action again, this time to download the profile photo in one of the available sizes. The following URI retrieves a user’s profile photo at the specified size via the Microsoft Graph API.
URI to download a user’s profile photo in the specified size.
In this example, I get Alex’s profile photo at 240×240
pixels:
Example URI to download a specific user’s profile photo at 240×240 pixels.
The Send an HTTP Request action configured with the URI and Method to retrieve Alex’s profile photo at size 240×240.
Here are the other available sizes you could request:
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/48x48/$value
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/64x64/$value
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/96x96/$value
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/120x120/$value
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/240x240/$value
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/360x360/$value
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/432x432/$value
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/504x504/$value
https://graph.microsoft.com/v1.0/users/Alex@company.com/photos/648x648/$value
The $value
segment in the URI is used to return the actual image content. Without the $value
segment, the request would just get details about the photo (such as its id
, height
, and width
). With $value
, we get the actual image content.
Example Flow: Download and Save a Profile Photo at a Specific Size
The flow below uses the Office 365 Send an HTTP request action to retrieve a user’s profile photo at a specific size (in this example, 360×360 pixels). The photo is returned in the response body as binary data. The OneDrive Create file action then takes this binary content and saves it to the /Attachments
folder with the filename AlexW.jpg.
Flow using Office 365 Send an HTTP Request to retrieve a user’s profile photo and save it to OneDrive.
Low-Resolution Uploads Can Lead to Blurry Profile Photos
If Alex uploads a profile photo of 240×240 pixels, Microsoft 365 will store it at that resolution. If I request a larger size, such as 648×648, Microsoft Graph will simply upscale the original 240×240 image, enlarging it without adding any extra detail. The quality of the image will still be limited to the original resolution (240×240), and as a result, the image may look slightly blurred or pixelated, especially on high-resolution screens. To get a true high-quality 648×648 image, the uploaded photo must be at least that size (or larger) so Microsoft 365 can store it at full quality.
Animation showing a profile photo from 48×48 to 648×648 pixels, with blurriness increasing as the size enlarges.Get User Photo (V2) Returns the Original Uploaded Size
When you use the Get user photo (V2) action, it retrieves the stored profile image exactly as it was uploaded. The size returned will match the original photo’s dimensions – it is not automatically resized to a standard format.
For example, when I uploaded a 1024×1792-pixel image for a user called “Demo User”, the action returned the same size. For Alex, who had uploaded a 240×240-pixel image, it returned 240×240 pixels.
Method | Uploaded Image | Retrieved Size | Result |
---|
Get user photo (V2) | 240×240 px | 240×240 px | Crisp, no upscaling |
Send an HTTP request (request 648×648) | 240×240 px | 648×648 px | Upscaled, may appear blurry |
Recommended Profile Photo Upload Size
Microsoft recommends using a square image with a clear face, and the file must be less than 4 MB in size. In some organisations, administrators may prevent users from changing their profile photos.
What to Do When a User Doesn’t Have a Profile Photo?
Using the Get user photo metadata action in Power Automate we can check if a user has a profile photo. This action provides a simpler, more reliable way of handling errors.
For example, if you use the Send an HTTP request action and the user has not uploaded a profile photo, the flow will fail with the error ImageNotFoundException
:
An ImageNotFoundException error occurs when the Send an HTTP Request action tries to retrieve a profile photo for a user who doesn’t have one.
To find out if a user has a profile photo, use the Office 365 Users – Get user photo metadata action. This action has a property called "Has photo"
, which will show "Yes"
if the user has uploaded a photo and "No"
if they have not.
The Get user photo metadata action in Power Automate.
The example below shows a flow using the Get user photo metadata action. The User (UPN) field is set to Alex@company.com
. Using a Condition step, we can check if the "Has photo"
property is equal to Yes
:
Condition step to check if the Has photo
property is equals Yes
.
If the "Has photo"
property is equal to Yes
, the flow can proceed to retrieve the photo and perform other actions.
Flow for getting user photo metadata and checking if a profile photo exists.
The Get user photo metadata action makes it much easier to handle situations where a user doesn’t have a profile photo, reducing the need for complex error handling in your flows.
Alternative: Check the Image file content
If you are using the Get user photo (V2), you can also check if a user has a profile photo by examining the Image file content property.
- If the Image file content property contains data, the user has uploaded a profile photo.
- If the Image file content property is null (empty), the user has not uploaded a profile photo.
Power Automate condition step checking if Image file content from Get user photo (V2) is null
In the condition step, we check if the Image file content from Get user photo (V2) is null
.
- Yes branch: No profile photo is uploaded.
- No branch: A profile photo exists.
The Get user photo metadata action makes it much easier to handle these situations. Its HasPhoto
field is self-explanatory, so even if you come back to the flow months later, you can instantly see if a profile photo exists without needing to dig deeper into the details of the flow.
Conclusion
In this post, I showed how to get Microsoft 365 user photos using Power Automate. I explained how to find the correct Graph API link, choose the photo size you need, and add it to your flows. I also covered how to handle situations where a user doesn’t have a profile photo, so your flows don’t fail with an error.
By following these steps you can easily use Microsoft 365 user photos in your flows, whether you need a small profile picture for an email or a larger image for a document.
And everything covered here works with standard connectors, so no extra licensing is needed.
First posted on 10 Aug 2025 at Ellis Karim's M365 & Automation Blog.