cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DJB22
New Member

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
Resolver III
Resolver III

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
Resolver III
Resolver III

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

YES THATS IT!! 

 

Omg absolute legend. 

 

Cheers for the help.

Thanks DJB22 - Glad I could Help!

 

Happy Apping!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (86,650)