web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

How to Get Microsoft 365 User Profile Photos in “Any Size” Using Power Automate

Ellis Karim Profile Picture Ellis Karim 11,202 Super User 2025 Season 2

An animated GIF displaying various sizes of a user profile photo, ranging from 48x48 pixels to 648x648 pixels, with a smiling individual in a professional setting.

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:

  1. How to Get a User’s Profile Photo
  2. Which Profile Photo Sizes are Available?
  3. How to Get Profile Photos in Other Sizes
  4. Low-Resolution Uploads Can Lead to Blurry Profile Photos
  5. What to Do When a User Doesn’t Have a Profile Photo?
  6. 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.

Get User photo action in Power Automate
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:

Screenshot of Power Automate showing the 'Get user photo (V2)' action configured with a user's email and the 'Create file' action with the image file content to save a profile photo.
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:

Screenshot showing a user's profile photo alongside file details in a OneDrive interface.
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 at different sizes starting from 48x48 to 648x640
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.


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

Power Automate action: Office 365 Send an HTTP Request
Select the ‘Send an HTTP Request’ action from the Office 365 Users connector in Power Automate.

Screenshot of the 'Send an HTTP request' action in Power Automate, showing fields for URI, Method (GET), Body, and Content-Type set to 'application/json'.
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:

Usage of the Microsoft Graph API for retrieving user photos in Power Automate.
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 of a URL format for retrieving user photos from Microsoft Graph API.
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.

Power automate Office 265 Send an HTTP request action: An interface to send an HTTP GET request to retrieve user photos from Microsoft Graph API, showing URI structure and content type.
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:

Power automate screenshot showing how to find the list of available photo sizes in Power Automate, with URI input, method, and outputs displayed.
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:

Power Automate runtime Illustration showing a list of available photo sizes for user profile pictures, including dimensions such as 48x48, 64x64, 96x96, and 120x120.
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.

Usage instructions for retrieving user profile photos via Microsoft Graph API, including a placeholder for userPrincipalName and photo size.
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 for retrieving user profile photo in specified size using Microsoft Graph API.
Example URI to download a specific user’s profile photo at 240×240 pixels.

Screenshot of the Send an HTTP Request action in Power Automate, showing fields for URI, Method, Body, and Content-Type.
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.

Screenshot showing a Power Automate action to send an HTTP request with a URI for retrieving user photos.
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.

An animated GIF displaying various sizes of a user profile photo, ranging from 48x48 pixels to 648x648 pixels, with a smiling individual in a professional setting.
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.

MethodUploaded ImageRetrieved SizeResult
Get user photo (V2)240×240 px240×240 pxCrisp, no upscaling
Send an HTTP request (request 648×648)240×240 px648×648 pxUpscaled, may appear blurry

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?

Use the “Get user photo metadata”

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:

screenshot Error message displaying 'Microsoft.Fast.Profile.Core.Exception.Image NotFoundException' thrown during the execution of the 'Send an HTTP request' action in Power Automate.
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.


Screenshot of Power Automate with selected action 'Get user photo metadata' under Office 365 Users connectors.
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:


creenshot of the Power Automate 'Get user photo metadata' action showcasing the user input field for an email address and metadata options including 'Has photo', 'Height', 'Width', and others.
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 diagram showing actions to get user photo metadata and check if a user has a profile photo in Power Automate.
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.

A flow condition in Power Automate checking if a user has a profile photo, displaying options for 'No Profile Photo' and 'User Has a Profile Photo' based on whether the image file content is null.
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.

Comments