user2026504
user2026504

Reputation: 84

Azure Logic Apps Fails to Connect to SQL Managed Instance: "The server was not found or..."

I am trying to connect an Azure Logic App (Standard) to an Azure SQL Managed Instance (MI). Both the Logic App and SQL Managed Instance are within the same Virtual Network (VNet) but reside in different subnets with separate Network Security Groups (NSGs).

Here’s what I’ve already done:

Network Configuration:

Connection Settings: Public endpoint access is disabled for the SQL Managed Instance as per company policy. Tried connecting via the private IP and DNS name of the SQL Managed Instance.

Testing:

I successfully connected to the SQL Managed Instance using the public endpoint on port 3342 (before disabling it for compliance).

Error: When trying to execute a query from the Logic App, I get the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.

Upvotes: 0

Views: 117

Answers (1)

Venkat V
Venkat V

Reputation: 7820

Azure Logic Apps Fails to Connect to SQL Managed Instance: "The server was not found or..."

The Logic App connector traffic will go through multiple public IPs. You can find the Logic App public IPs here based on the region. Since there is no option in SQL Managed Instance to allow traffic from Logic App region connectors' IPs, you can enable the public endpoint and create an inbound NSG rule to allow traffic to SQL only from the Logic App connector, using port 3342. This way, you can restrict public traffic and allow only Logic App traffic on port 3342.

To establish a secure connection between the Logic App and the SQL Managed Instance, you can create an NSG rule that allows inbound connectivity from all Logic App connectors in the SQL MI subnet by enabling the public endpoint in SQL MI.

enter image description here

Attach the NSG to SQL MI Subnet.

enter image description here

Referecne: Available service tags

Configure public endpoints in Azure SQL Managed Instance

Upvotes: 0

Related Questions