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

Error 502 - connecting to SQL Server over VPN

Hi all,

I'm attempting to connect a PowerApp to a SQL Sever. I'm on a VPN, and SSMS works fine on the same computer, but I get the below error when trying to connect. Is there anything different when trying to connect via PowerApps that I would need to change?

The server is clearly running, and I would imagine that being able to connect over VPN with SSMS would indicate that the server can accept remote connections. This isn't Flow related like a lot of the other 502 posts, and many of those don't seem to be "solved" so much as they just started working again.

 

Spoiler

{

  "error": {

    "code": 502,

    "source": "unitedstates-002.azure-apim.net",

    "clientRequestId": "d16f049f-bc96-4d92-a8ff-7fad035754c5",

    "message": "BadGateway",

    "innerError": {

      "status": 502,

      "message": "Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.)\r\nclientRequestId: d16f049f-bc96-4d92-a8ff-7fad035754c5",

      "source": "sql-eus.azconn-eus.p.azurewebsites.net"

    }

Thanks!

2 REPLIES 2
Community Support Team
Community Support Team

Re: Error 502 - connecting to SQL Server over VPN

Hi @RMDNA ,

 

Connecting to your on-premises data sources from PowerApps, you need to use on-premises data gateway. For more information, please refer to:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-azure-sqldatabas...

https://powerapps.microsoft.com/en-us/blog/connect-to-your-on-premises-data-sources-using-on-premise...

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TopShelf-MSFT
Level 10

Re: Error 502 - connecting to SQL Server over VPN

Hi @RMDNA are you still experiencing this error? Did the above reply help? 

 

@TopShelf-MSFT 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,965)