cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DJB22
Level: Power Up

SQL/O365 - Checking common fields and displaying the O365 UserPhoto.

Hi Everyone!

 

Im currently working on a staff directory using powerapps and I need ideas on how to proceed.

 

I need to pull Office365 profile picutres (using the O365Users Connector) and match them with the corresponding staff record (from our SQL database, using the SQL Server Connector).

 

Currently, the records are being displayed in the gallery and Im filtering the gallery using a search bar. Once the user finds the record they want, they click the arrow button which populates the right-hand-side information screen. 

 

SD.PNG

 

So my issue is finding a way to "check" the common fields ('Email' OR 'Initials') and display the O365 profile picutre (UserPhoto). 

 

For example: When I press the gallery button, the app should check the SQL Email with the O365 Email and if both match then display the selected users O365UserPhoto.

 

If you need any further clarification on anything, feel free to leave a comment.

 

Any ideas/solutions is much appreciated.

 

Thankyou!!!

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
myke_deabreu
Level 8

Re: SQL/O365 - Checking common fields and displaying the O365 UserPhoto.

Hi Djb22,

 

For you to get the Profile Picture you need to get the users O365 ID. You could use the UPN or Email address to get this.

 

Try the following:

 

Set the Image function of your media image to

 

Office365Users.UserPhotoV2(First(Office365Users.SearchUser({searchTerm:**EMAILADDRESS**})).Id)

 

Let me know if this works.

 

There could be an easier way just not to sure how your app is setup but that should do the trick.

View solution in original post

3 REPLIES 3
myke_deabreu
Level 8

Re: SQL/O365 - Checking common fields and displaying the O365 UserPhoto.

Hi Djb22,

 

For you to get the Profile Picture you need to get the users O365 ID. You could use the UPN or Email address to get this.

 

Try the following:

 

Set the Image function of your media image to

 

Office365Users.UserPhotoV2(First(Office365Users.SearchUser({searchTerm:**EMAILADDRESS**})).Id)

 

Let me know if this works.

 

There could be an easier way just not to sure how your app is setup but that should do the trick.

View solution in original post

DJB22
Level: Power Up

Re: SQL/O365 - Checking common fields and displaying the O365 UserPhoto.

YES THATS IT!! 

 

Omg absolute legend. 

 

Cheers for the help.

myke_deabreu
Level 8

Re: SQL/O365 - Checking common fields and displaying the O365 UserPhoto.

Thanks DJB22 - Glad I could Help!

 

Happy Apping!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 248 members 6,289 guests
Please welcome our newest community members: