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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get User Photo V2 (If ...
Power Automate
Unanswered

Get User Photo V2 (If blank content is returned how to set sampleimage)

(3) ShareShare
ReportReport
Posted on by 2,563

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?

Categories:
I have the same question (0)
  • JimmyW Profile Picture
    2,563 on at

    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?

  • JimmyW Profile Picture
    2,563 on at

    Bump

  • chico Profile Picture
    638 on at

    +1 

    also looking at options on how to filter out those that dont have a photo.

  • chico Profile Picture
    638 on at

    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.

  • Paulie78 Profile Picture
    8,422 Moderator on at

    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?

  • Community Power Platform Member Profile Picture
    on at

    That's great. Would be nice to see the actual code you used to help out others as well.

  • Verified answer
    JimmyW Profile Picture
    2,563 on at

    @Anonymous 
    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
    )

     

     

  • ashlanjewar90 Profile Picture
    3 on at

    Hi @JimmyWork 

     

    I will be thankful if you send me that flow for "flow that extracts the users image and then uses the content output in an adaptivecard to display the users image." because I could not able to display that image using adaptive card. So could you pls send me your adaptive card code how you applied? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard