How to get profile picture from office 365 and get it displayed in power apps. I have connected office 365 user database and using share point list as data source. Am able to get user name, email id. but not able to get profile picture.
Used below formula in image property. If(Office365Users.UserPhotoMetadata(Office365Users.MyProfile().Id).HasPhoto,Office365Users.UserPhotoV2(Office365Users.MyProfile().Id),SampleImage)
Getting attached error
I actually just did this today...
This is the formula I used...
if you need further send me a note at Jay@research-Nest.com and I will got on teams with you and see if I can help you further,
Based on the issue that you mentioned, do you want to display an office365 profile picture in PowerApps?
If you just want to display your own profile picture, put the formula as below into the Image property.
Combine that with your description, you want to display a profile picture based on users and check if they have a picture. Please check if the user has an ID or other unique key like Email.
Please try the following formula.
If( IsBlank(ThisItem.Id), 'profilepic-generic-user', If( Not(UserDomain.Text = MyDomain), 'profilepic-generic-user', ( If( Office365Users.UserPhotoMetadata(ThisItem.Id).HasPhoto = true, Office365Users.UserPhoto(ThisItem.Id), 'profilepic-generic-user') ) ) )
Also, you can check the following thread for reference:
Check out new user group experience and if you are a leader please create your group
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.