Hi i have a flow that extracts the users image and then uses the content output in an adaptivecard to display the users image. Now i found some users don't have an image set so the content returns blank.
How can i set a sampleimage to refer to is the users image is blank?
I use Base64 and compose the image content.
Is there a way for me to use set a sampleimage in Base64?
Solved! Go to Solution.
@Sim2KUK
You might need to change Microsoft365User to Office365User
If(
!IsBlank(ThisItem.'Created By'.Email),
If(
Microsoft365Users.UserPhotoMetadata(ThisItem.'Created By'.Email).HasPhoto,
Microsoft365Users.UserPhotoV2(ThisItem.'Created By'.Email),
SampleImage
),
SampleImage
)
Bump.
Anyone, how do you handle blank User Photo? My flow stops due to compose is empty. So i need a condition if User Photo content = null.
Should just create a blank user with photo and fetch that?
Bump
+1
also looking at options on how to filter out those that dont have a photo.
actually just stumbled across something that may help,
the get user metadata will tag "true" if user has a photo, so in my case I just tossed a condition looking for the "true" value.
In answer to your initial question, it would certainly be possible to use a sample image. But I guess you don't need it anymore?
That's great. Would be nice to see the actual code you used to help out others as well.
@Sim2KUK
You might need to change Microsoft365User to Office365User
If(
!IsBlank(ThisItem.'Created By'.Email),
If(
Microsoft365Users.UserPhotoMetadata(ThisItem.'Created By'.Email).HasPhoto,
Microsoft365Users.UserPhotoV2(ThisItem.'Created By'.Email),
SampleImage
),
SampleImage
)
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
64 | |
27 | |
22 | |
15 | |
15 |
User | Count |
---|---|
123 | |
46 | |
43 | |
35 | |
31 |