cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
omi18
Post Patron
Post Patron

Office 365 profile Pic

Hello,

 

I'm trying to get a picture from O365 profile. 

 

Case: I have a gallery connected to the SQL server. And I'm trying to show a picture of the same person using O365 profile. 

 

is there any way or suggestion? 

 

Best,

Omi

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@omi18 

What is the error you are seeing?  Is the value in ThisItem.email1 a valid email?  If there are ANY invalid email addresses in your Gallery, you will get an error on the formula.  Usually though, any row that IS valid, will have a photo.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

8 REPLIES 8
RandyHayes
Super User
Super User

@omi18 

You will need to utilize the Office 365 Users connector and the GetUserPhotoV2 action to get this.

Supply the user email address in the parameter and, if all is valid, you will get the image.  You can apply this to the Image property of an Image control.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes ,

 

I have the below formula for image property. 

 

Hello,

 

I'm trying to get a picture from O365 profile. 

 

Office365Users.UserPhotoV2(ThisItem.email1)

 

but gives me an error. 

 

Best,

Omi

RandyHayes
Super User
Super User

@omi18 

What is the error you are seeing?  Is the value in ThisItem.email1 a valid email?  If there are ANY invalid email addresses in your Gallery, you will get an error on the formula.  Usually though, any row that IS valid, will have a photo.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

@RandyHayes ,

 

Yes, the email is the same as user's O365 profile. 

 

omi18_0-1613490140654.png

Thanks,

Omi

RandyHayes
Super User
Super User

@omi18 

If the emails are valid, you will get photos.

Try to hardcode an email address into the formula:

Office365Users.UserPhotoV2("youremailaddress")

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
danielvi
Helper I
Helper I

Hi,

I have used other method that works for me.

 

I use the formula:  "https://outlook.office.com/owa/service.svc/s/GetPersonaPhoto?email=" & ThisItem.Email & "&size=HR96x96"

 

Try it and see if works for you as well.

Best!

Daniel

Hi @RandyHayes ,

 

It worked. I had to restart the Powerapps studio. 

 

Thanks,

Omi

ElinaSen
Helper IV
Helper IV

Use the reliable software is ZOOK Office 365 Backup and Restore Software is an outstanding and easy to process tool.This software enables you to take the bulk backup of multiple Office 365 account users profile. This tool will help you to export Office 365 account to Outlook to save PST file.Allows performing the batch conversion from Office 365 to multiple formats like Outlook PST, MBOX, MSG, EML, PDF, etc. This tool supports multiple Office 365 platform and also able to perform Office 365 to IMAP migration.

 

Explore More: https://www.zooksoftware.com/office-365/backup/

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,842)