Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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


Kudo Kingpin
Kudo Kingpin


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!



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;



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!


Not applicable

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

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,919)