You're running into a limitation of sp_invoke_external_rest_endpoint
in Azure SQL Database: it cannot access private endpoints, including private Azure Container Apps, even if the SQL Database is in the same VNet through private link.
sp_invoke_external_rest_endpoint
uses Azure SQL managed identity and network stack to invoke HTTP(S) endpoints — but Azure SQL Database does not reside inside your VNet. Even if it's accessible from your VNet via Private Link, outbound requests from Azure SQL go over public Azure infrastructure, not through your private network.
So even if your Container App is accessible via private endpoint.
You’ve set up VNet integration, DNS, NSGs, etc.
You can curl
from VMs in the VNet.
...sp_invoke_external_rest_endpoint
won’t reach it, because Azure SQL cannot route to private IPs or private DNS zones from its backend.
If you need Azure SQL to call a private service, use a Public IP for the Container App with Authentication or I recommend :
- an Azure Function / Logic App as a public proxy
- ADF or Synapse pipeline Instead