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 Apps / User image not showing...
Power Apps
Unanswered

User image not showing up.

(0) ShareShare
ReportReport
Posted on by 2,563

Hi

 

So i  have a strange issue.
I have a gallery that uses SharePoint. I have a image in the gallery item that says 

 

Thisitem.PeopleColumn.Picture

 

Now this works at my home computer, shows the images just fine.
On my work computer it shows no images at all.

 

So i tried the following.

 

Microsoft365Users.UserPhotoV2(ThisItem.PeopleColumn.Email)

 

 And it displays the picture but i get an error saying invalid value of parameter 'id' and this goes for all people columns that is not a system column like Modified By or Created By those works fine.

 

Don't know if this is a temporary issue or if the issue have been created due to using Patch on some of the people columns? My patch function is with curly brackets. And the data in the column looks fine after patching.

 

 

'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Department: "", 
 DisplayName:User().FullName,
 Claims:"i:0#.f|membership|" & Lower(User().Email), 
 Email:User().Email,
 JobTitle: "",
 Picture: ""

 

 

Categories:
I have the same question (0)
  • Joel CustomerEffective Profile Picture
    3,224 on at

    Do you by any chance use hybrid office with exchange on premise? I recently had a project that did and if you have exchange on premise it has to retrieve the user photo from exchange on premise and in some cases would time out

  • Verified answer
    JimmyW Profile Picture
    2,563 on at

    @jlindstrom Thank you for answering.

     

    All users have been migrated and are exchange online only.

    The weird part is that the function works fine on one computer and not the other one. And the other weird part is that the code gives id value error on columns that are not system created columns.

     

    Next weird thing is that it just started working with ThisItem.PeopleColumn.Picture again on both computers but the MicrosoftOffice365 still gives id value error if you have used patched function

  • Verified answer
    Joel CustomerEffective Profile Picture
    3,224 on at

    weird--I've seen those kind of flukey things that just start working again.

  • JimmyW Profile Picture
    2,563 on at

    @jlindstrom The issue just came up again.

     

    ThisItem.PeopleColumn.Picture works sometimes, i even tried on the same computer different users and i get different results sometimes it works sometimes it does not. And it can be the same user that gets different results.

     

    Anyone else had issues with this type of things?

     

    I went on and did the following on Image

     

    If(ThisItem.Status.Value = "Unassigned", Blank(), Microsoft365Users.UserPhotoV2(ThisItem.'Assigned To'.Email))

     

    Now this seems to work better but i still end up with some users going blank pictures sometimes and sometimes showing i don't understand why really.

  • Joel CustomerEffective Profile Picture
    3,224 on at

    I'm not sure. Maybe @EricRegnier @WarrenBelz have an idea?

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Sorry, not a user of that field (we do not have control locally)

  • JimmyW Profile Picture
    2,563 on at

    Seems to me it's a bug or something.

     

    On one screen it works on another screen it gives an error.
    Running the app in a webrowser and everything works fine but when you edit it in powerapps it stops working sometimes and gives an error on the code in one screen but not on the other, if i copy paste the code where it gives me an error it shows no error again until i start a new edit.

     

    Error on this screen

    Screen1Screen1

     

    No error on this screen

    Screen2Screen2

     

    My full line (Is something wrong with this?)

    If(ThisItem.Status.Value = "Unassigned", Blank(), Microsoft365Users.UserPhotoV2(ThisItem.'Assigned To'.Email))

     

     

  • JimmyW Profile Picture
    2,563 on at

    The issue was my logic in this case i got an error because i checked the wrong column.

    But the issue with ThisItem.PeopleColumn.Picture still exists.

  • M2CE Profile Picture
    31 on at

    Hello Together

     

    I experienced today the same issue by using "Microsoft365Users.UserPhotoV2(ThisItem.PeopleLookUp.Email)". The images are displayed correctly, but i am getting also an error tick which is saying invalid value of parameter 'id'.

     

    Any workaround to get rid of this error?

     

    Thanks for your help

  • suariokbea Profile Picture
    14 on at

    For the ones that still can't make this work I found out a work around following the solution of this post.

    In my case I was looking for a work around for iPad.

    I found out that the profile image came from Sharepoint:

    https://[yourcompanyname].sharepoint.com/_layouts/15/UserPhoto.aspx?Size=L&AccountName=  + [User Email]

    But when you write this link on the image value , sometimes PowerApps dont pull the content of the image, it just "reads the link value", so it is not going to render in the canvas. So what I did was to make a PowerAutomate Flow to Pull the content  of that link:

    Steps:

    • Make a Instant Clod Power Automate Flow triggered form PowerApps
    • Select the Send an HTTP request to SharePoint and configured it as follow (you need to send from powerapps the desired Email):imagen_2022-05-11_133530741.png
    • This is going to retrieve the type-content and content , you can filtered it by adding a Compose step and setting the value to 
    • imagen_2022-05-11_133936065.png

    • outputs('Send_an_HTTP_request_to_SharePoint')?['body'].$content
    • Send back the content to Power Apps selecting the "Respond to a PowerApp or flow" connectorimagen_2022-05-11_134210701.png
    • In power apps you just need to set in OnStart rule the next sentence  
    • Set(
      varContent;
      'NameOfYourFlow'.Run(User().Email).content
      );;
    • And due the content is in base64 format you need to set the value of the desired image as
    • "data:image/jpeg;base64," & varContent

    Tada magic!

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard