cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Office 365 user photo failed error

Hello,

 

I am displaying users details in gallery, where in Image, I am using following formula to display respected item's userPhoto:

 

First Attempt:

Office365Users.UserPhoto(First(Office365Users.SearchUser({searchTerm:ThisItem.'Full Name'})).Id)

 

Second Attempt:

If(!IsBlank(First(Office365Users.SearchUser({searchTerm:ThisItem.'Full Name'})).Id),Office365Users.UserPhoto(First(Office365Users.SearchUser({searchTerm:ThisItem.'Full Name'})).Id))

 

Both the times, It throws following error message only in MOBILE APP:

 

Screenshot_20190502_115000.jpg

 

While in PA Studio, it displays the image with error as follows:

 

Error4.png

 

Can anyone please guide?

 

Best Regards,

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Office 365 user photo failed error

Hi @dips23 ,

 

Firstly, you need to add the Office365Users connector. And I test as next, you just need to ajust your formula expression that will be ok. I test as next:

Data Source:

20190503UserPhotoDataSource.PNG

 

App Test:

Gallery2.Items:'20190503User'

Image2.Image:Office365Users.UserPhoto(First(Office365Users.SearchUser({searchTerm:ThisItem.Person_S.DisplayName})).Id)   (Person_S is the column Name in my SP list, you can change to yours on your side)

20190503UserPhotoAppTest1.PNG

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Office 365 user photo failed error

Hi @dips23 ,

 

Firstly, you need to add the Office365Users connector. And I test as next, you just need to ajust your formula expression that will be ok. I test as next:

Data Source:

20190503UserPhotoDataSource.PNG

 

App Test:

Gallery2.Items:'20190503User'

Image2.Image:Office365Users.UserPhoto(First(Office365Users.SearchUser({searchTerm:ThisItem.Person_S.DisplayName})).Id)   (Person_S is the column Name in my SP list, you can change to yours on your side)

20190503UserPhotoAppTest1.PNG

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Office 365 user photo failed error

Thanks for posting in the community @dips23 - can you review the above reply and update the thread if it was helpful?

 

Thank you,

 

@TopShelf-MSFT 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,658)