ConnectionGatewayFailure, ARM deployment (logic app + custom connector + on-prem gw)

Pavan Baikati 1 Reputation point
2020-07-26T04:09:40.143+00:00

Hi Everyone,

Can someone please assist with below...

I am trying to deploy a logic app from Visual Studio, and running into this error

Status Message: Establishing connection with the service failed with code 'BadRequest'. (Code:ConnectionGatewayFailure)

Logic app is trying to connect to CustomConnector which uses OnPremDataGateWay. Authentication set on the Custom Connector is No Authentication. Other SQL connections using OnPremDataGateWay within same logic app are deploying fine.

There is no issue with Custom Connector, I tried to build logic app in portal directly, and it ran successfully.

I am getting this error only when trying to deploy using Visual Studio ( powershell script )

Thanks!

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,712 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Scott Bellis 1 Reputation point
    2020-08-27T18:55:30.157+00:00

    I believe this is because the ARM template doesn't contain the necessary connection details for the api connection to link to the on-prem gateway. There are some hidden properties that you need to provide in the API connection ARM template.

    "parameterValues": {
              "authType": "[parameters('authType')]",
              "gateway": {
                "id": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',parameters('gatewayresourcegroup'),'/providers/Microsoft.Web/connectionGateways/',parameters('gatewayname'))]"
              }
            }
    

    Once I provided those, the api connection Status went to "Connected" rather than "Error"

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.