Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

connect to sql db



I have tried to connect to our SQL server DB from Power Apps connect directly but i got an error. so please help me to fix this issue.


Thank you



Re: connect to sql db


A few things to look into : 

  • Connectivity : if your DB is on-prem, the problem may come from the gateway. Make sure it's up and running, and ideally that another program (ex : power BI) can connect to it. If you DB is in the cloud (ex: Azure SQL DB), there may be firewalls rule preventing power apps to connect. Also be aware that firewall rules may exist independtly on the server level and on the DB level. Fun stuff ^^
  • Authentication : maybe you can reach the server but your identity is not recognized by the DB. Test your username/password in another client like SSMS or Azure Data Studio you are allowed on that database.
  • Authorization : maybe you can connect and are recognized by the server, but the owner of the data did not give you permission to read or write the data. If you can connect but don't see any tables, it probably points to that.

Also if possible, maybe choose the general help channel for this kind of topic rather than the News and Annoucements.

Good luck!

Level: Powered On

Re: connect to sql db


I can connect to SQL DB from excel, power Bi, crystal report. only power apps i can't. i think there is some thing in power apps. I have checked all what you mentioned but still can't connect.


Best regards;


Super User
Super User

Re: connect to sql db

Hi @nsaleh 

Is this the same problem that you posted here?



If you're using the on-premises gateway, here are some things to try.

  • From the computer where you installed the on-premises gateway, install Management Studio and try connecting to your SQL Server. The point of this exercise is to establish whether your internal gateway can connect to SQL Server, and that there aren't any firewall rules that are blocking the connection.
  • Is your SQL Server name setting correct? For example, if you're using a named instance, you would enter the value sqlsvr1\sqlexpress (or whatever instance name is correct in your setup)
  • If Windows authentication fails, try using SQL Authentication instead, if your SQL Server is set up for mixed mode authentication.
  • If you need to use Windows authentication and it still fails, try entering your username in the format YOURDOMAIN\Username.
  • If you still can't connect, try connecting by IP address rather than servername. Eg instead of entering sqlsvr1 as the servername, try using (ie, the IP address that corresponds to your SQL Server).

Good luck!



Re: connect to sql db

Thanks for posting in the community @nsaleh - can you advise if you're still experiencing this issue and also review the above reply?


Thank you,



Helpful resources


PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.


Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

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


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 433 members 5,362 guests
Please welcome our newest community members: