Hi everyone,
I am trying to connect a Power Automate Cloud Flow to an Azure OpenAI Service via an On-Premises Data Gateway. The Azure OpenAI resource has "Public Network Access" disabled and is only reachable via a Private Endpoint.
The Setup:
-
Target: Azure OpenAI (
https://at-ai-openai-dev-bue-002.openai.azure.com/...) -
Gateway Server: Windows Server with On-Premises Data Gateway installed.
-
DNS: I have mapped the domain to the private IP (
10.57.x.x) in the localhostsfile on the Gateway server. -
Connector: Custom Connector with "Connect via on-premises data gateway" enabled. Authentication is set to "None" (API Key is passed via Header).
The Problem: When I run a curl command directly on the Gateway Server, it works perfectly and returns the expected JSON from OpenAI. This confirms that DNS, Firewall, and SSL Handshake are working on the OS level.
However, when triggering the Custom Connector from Power Automate, I receive a 500 Error.
The Error in Power Automate:
{
"status": 500,
"message": "Received error payload from gateway service with ID XXXXX: <ccon>An error occurred while sending the request.</ccon>.\r\nclientRequestId: ...",
"error": {
"message": "Received error payload from gateway service with ID XXXXX: <ccon>An error occurred while sending the request.</ccon>."
},
"source": "gatewayconnector-we.azconn-we-004.p.azurewebsites.net"
}
What I have verified:
-
cURL/PowerShell works: The endpoint is reachable from the server console.
-
Gateway Logs: The request reaches the Gateway but fails locally with "An error occurred while sending the request".
-
Headers: I am using the
api-keyheader andx-ms-model-mesh-model-name.
My Question: Since the OS can reach the endpoint but the Gateway Service fails: Could this be related to the .NET Runtime used by the Gateway Service not using TLS 1.2 by default? Or are there specific headers that the Gateway Service strips/blocks?
this ist the curl I tested.
curl -X POST "https://at-ai-openai-dev-bue-002.openai.azure.com/openai/v1/chat/completions" -H "Content-Type: application/json" -H "api-key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -H "x-ms-model-mesh-model-name: gpt-4o" --data-raw "{\"messages\":[{\"role\":\"system\",\"content\":\"You are a helpful assistant.\"},{\"role\":\"user\",\"content\":\"Write a haiku about the ocean.\"}],\"max_tokens\":100,\"temperature\":0.7}"
Any help is appreciated!

Report
All responses (
Answers (