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

PowerApps - Login error to On-premises SQL database

I have an on premise SQL database that I have successfully connected through a gateway to a PowerApp.  When I run the PowerApp, I get this message:


Office365Users.UserPhotoMetadata failed: The method 'UserPhotoMetadata' has an invalid value for parameter 'userId'


I'm new to PowerApps but I assume this is because my login information in my SQL database is not the same as Office 365 user logins.


Is there a way to link them using Flow or lookups?  Any help would be greatly appreciated.

Super User
Super User

Re: PowerApps - Login error to On-premises SQL database

Hi @susehowe

This error is unlikely to be related to the connection that you have with SQL Server.

The more likely cause is that somewhere in your app, you're displaying a photo via an Office365Users connection and the userId of the user that you want to display no longer exists. Could you share some more info about where you're using  Office365Users in your app?

Level: Power Up

Re: PowerApps - Login error to On-premises SQL database

I haven't published the app yet, so I'm the only one working on it.   I started with the Leave Request template.  It may have connected to my Office365 users group.  This is my 1st attempt at an app, so I'm a little over my head, but interested in learning.

Thanks for your help!

Helpful resources


Power Apps Community User Group Member Badge

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


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


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,863)