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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error on image in powe...
Power Apps
Unanswered

Error on image in power apps

(0) ShareShare
ReportReport
Posted on by 642

Hello Community Experts,

I'm using this to fetch the details of manager

gallery1 has details of all the office 365 users

Office365Users.Manager(gallery1.Selected.Mail)

 

Its image has the below code and it is causing the below error

Office365Users.UserPhotoV2(ThisItem.Id)

imgerr.PNG

And its title has the below code

ThisItem.DisplayName

 

Kindly guide

Best regards,

Sumaira

 

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Sumaira :

    Could you tell me what gallery1 is?Is it an onther galler?

    I'v made a test and it worked fine.

    1\Add a gallery and set it's Items proeprty to:

     

    Office365Users.Manager("bof@XXXXX.com")

     

    2\Add a image control into this gallery and set it's image property to:

     

    Office365Users.UserPhotoV2(ThisItem.Mail)

     

    1.JPG2.JPG

    I suggest you check whether the value of "Office365Users.Manager(gallery1.Selected.Mail)" is empty.

    Best Regards,

    Bof

  • Sumaira Profile Picture
    642 on at

    @v-bofeng-msftThanks a lot for the response

    I have gallery1 which lists all the users from office 365

    And gallery2 which shows the selected users manager details

    It is showing the managers name, but the image is causing error all time.

    Kindly Advise

    Best Regards,

    Sumaira

  • Sumaira Profile Picture
    642 on at

    @v-bofeng-msftThe mail field is not empty it fetches the mail of the selected user

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Sumaira :

    Please check if the user has a manager.If the user does not have a manager, an error will be reported.

    Maybe this link will help you:

    Setting up User’s Manager in Office 365

    Best Regards,

    Bof

  • Sumaira Profile Picture
    642 on at

    @v-bofeng-msftThe user has manager, please guide @v-bofeng-msft 

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Sumaira :

    I am not sure where the problem is,could you:

    1\Provide me with detailed setup steps?So that I can try to restore your situation.

    2\Please try my previous test steps ,then tell me if you get the current result.

    Best Regards,

    Bof

  • Sumaira Profile Picture
    642 on at

    @v-bofeng-msftThanks I'll check and get back

  • Sumaira Profile Picture
    642 on at

    @v-bofeng-msftSorry was busy with priority tasks

    I'm still getting same error even after following the approach you shared

    @kindly guide

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Sumaira :

    Have you tried "hard coding"?

    Can this code get the manager's email address?

     

    Office365Users.Manager("User@XXXXX.com").Mail

     

    Can this code get a picture?

     

    Office365Users.UserPhotoV2("manage@xxx.com")

     

    Best Regards,

    Bof

  • Sumaira Profile Picture
    642 on at

    @v-bofeng-msftThanks a lot for the response

    I tried this and error is gone If(!IsBlank(ThisItem.Mail),Office365Users.UserPhoto(ThisItem.Mail))

    But, it should display sample image if the user has no image uploaded

    How do i achieve that

    Kindly guide

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard