Yesterday, I was working with a Power Apps product [Employee Satisfaction Survey], and there was a screen called All Surveys where that could only be displayed to Admin people.
I have a Power Apps Gallery in the All Surveys screen that displays everyone’s survey details, including their profile images. Unfortunately, I encountered one issue: the profile images showed some employees and did not display some of the employees’ devices.
Later, I realized that Power Apps sometimes could not fetch user profile images from a person’s name or email. In that case, we must use the Office 365 Users connector in the Power Apps canvas app.
In this article, I will tell you how to show user profile pictures from email in Power Apps. Also, we will discuss how to get a user profile image in Power Apps from a SharePoint person column.
Show User Profile Pictures From Email in Power Apps
Let’s discuss how to display a user profile image from a SharePoint Email field in Power Apps.
Here, I have a SharePoint list named Employee Survey Form that contains the fields below:
Column | Data type |
---|---|
Employee Full Name | Person |
Employee Email | Single line text |
Contact Number | Number |
Current Location | Choice |
Age | Number |

In Power Apps, a Horizontal gallery control displays all the employee details, as shown below. I want to display all the employee images from the SharePoint Employee Email field.

In this case, we need to use the Office 365 Users connector in the Power Apps canvas app. Once we connected it, select the image from the gallery and set its Image property to the formula below:
Image = Office365Users.UserPhotoV2(ThisItem.'Employee Email')
OR, we can use the code below:
Image = Office365Users.UserPhotoV2(ThisItem.'Employee Full Name'.Email)
Where,
- ‘Employee Email‘ = SharePoint text field that holds the email of individuals
- ‘Employee Full Name’ = SharePoint person field name

This above code works perfectly fine apart from any users who don’t have a profile picture. The problem is, if a user does not have a profile pic, how can we handle it?
In this case, we can use the if-else statement to recover where the user has no photo. Write the code below on the gallery’s Image property as:
Image = If(
Office365Users.UserPhotoMetadata(ThisItem.'Employee Email').HasPhoto,
Office365Users.UserPhoto(ThisItem.'Employee Email'),
SampleImage
)

OR, you can apply the code below:
Image = If(
IfError(
Office365Users.UserPhotoMetadata(ThisItem.'Employee Email').HasPhoto,
false
),
Office365Users.UserPhoto(ThisItem.'Employee Email'),
SampleImage
)
The code explains that if the user has the photo, it will display that employee’s profile picture; otherwise, it will display the sample image.

This way, we can show user profile pictures from email in Power Apps.
Power Apps Get User Profile Image From a SharePoint Person Field
Here, we will discuss two things, i.e.
- Get user profile picture from SharePoint person single-valued field
- Get user profile picture from SharePoint person multi-valued field
Power Apps Get User Profile Image From SharePoint Single-Valued Person Field
Select the image from the gallery and set its Image property as:
Image = ThisItem.'Employee Full Name'.Picture
‘Employee Full Name‘ = Sharepoint Person Single Valued field

But sometimes, the employee profile pictures are not displaying on other devices like PC, iOS, Android, etc. We have another approach (workaround) to display an image on ALL device types: the “Office 365 Users” connector to get a picture.
Image = If(
!IsBlank(ThisItem.'Employee Full Name'.Email),
Office365Users.UserPhotoV2(ThisItem.'Employee Full Name'.Email)
)

Finally, Save and Publish the app. Also, open this application on any other device, like a PC or iOS, and it will show the image of all employees, as shown in the screenshot above.
Power Apps Get User Profile Image From SharePoint Multi-Valued Person Field
Next, we will learn how to get the user profile picture in Power Apps from a SharePoint multi-valued field.
In the image below, you can see a SharePoint Person field called Employee Full Name, which is multi-valued. It can take multiple person names.

I want to get the user profile image from the SharePoint multi-valued person field in a Power Apps gallery control.
1. To work around this, insert a sub-gallery inside the main gallery control (+ Insert -> Blank horizontal gallery).

2. Add an image control (+ Insert -> Image) inside the sub-gallery.

3. Select the sub-gallery and set its Items property as:
Items = ThisItem.'Employee Full Name'
‘Employee Full Name‘ = Specify the SharePoint multi-person valued column

4. Select the image inside the sub-gallery and set its Image property as:
Image = If(
!IsBlank(ThisItem.Email),
Office365Users.UserPhotoV2(ThisItem.Email)
)
There is no need to add a field name for the Image property because it is already given in the Items property.

5. Save, publish, and preview the app. You can see all the user profile pictures from the Sharepoint person multi-valued field, as shown in the image below.

I hope this article finds you helpful. This way, we can show user profile pictures from email in Power Apps. Also, we learned to get the user profile images from a SharePoint single-person column and a multi-person field with various examples.
Additionally, you may like some more Power Apps articles:
- Dynamically Display Image in Power Apps
- The Best Approach to Add an Image to a PDF Form in Power Apps
- Power Apps Show Image from SharePoint List
- Add Image to a Power Apps Collection
- Upload images to Dataverse from Power Apps
- Top 50 Power Apps Interview Questions and Answers
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com