cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Resolver III
Resolver III

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

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

Highlighted
New Member

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

YES THATS IT!! 

 

Omg absolute legend. 

 

Cheers for the help.

Highlighted
Resolver III
Resolver III

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

Thanks DJB22 - Glad I could Help!

 

Happy Apping!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (2,224)