The Ultimate Guide to Connecting to On-Premise API’s using Azure Logic Apps

Navaneeth Sen
4 min readFeb 15, 2022

I recently had to finish a project in which the final task was to setup an Azure Logic Apps Workflow which can get and push information from an On-Premise system which is not visible in the public internet. Basically, I wanted to connect to an RESTful Web Service and get details regarding an asset and to post updated details of the asset. The requirement was that all api’s need to be secure.

Whereas the process of setting this up was straight forward for the most part, I uncovered a lot of details along the way which will be extremely valuable to you especially if you are about to kick off your journey with Azure Logic Apps for On-Premise Services.

So the first step was to get a Windows VM with 500GB storage and with the below details:

After this machine was ready, I had to check if the machine had .NET Framework 4.7.2 and luckily it had, other wise please download and install this from the link -> https://dotnet.microsoft.com/en-us/download/dotnet-framework/net472

Once the .NET Framework is installed, please download and install the data gateway from the link -> https://www.microsoft.com/en-us/download/details.aspx?id=53127

I followed the exact steps as given in the document at https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-gateway-install.

The next major step was to get the various ports opened for Outgoing connections in the Firewall for this specific machine (it has a unique source ip inside the on premise network). The various ports which needs to opened in the firewall are given below:

Once the above ports are opened in the machine, the On Premise gateway Installation is straightforward.

After installation, you would see something like the picture shown below:

To see the various Gateways we have created in our account you can go to the following link -> https://admin.powerplatform.microsoft.com/ext/DataGateways. Please remember to select the right region to manage the different gateways.

Once these steps are done, to access data sources on premises from your logic apps, we have to create a gateway resource in Azure for the created gateway installation. You can follow the steps mentioned in the link -> https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-gateway-connection

Now comes the exciting part where we can create a logic app which connects to the On Premise System to retrieve some info. I am going to show a sample app which I have created to test the setup below:

So this logic app is an HTTP Trigger which can be invoked with a POST request with some Body.

Now the Next step is where we can get confused. The normal HTTP connector doesn’t work here. For this specific case, we need to use another Connector named “HTTP with Azure AD” with Action “Invoke an HTTP request”.

At that point, it will ask to create a connection for using this Connector as shown below:

You can tick the “Connect via on-premise data gateway” and then you see another form as shown below:

Specify all the necessary details of your on-premise gateway and provide the base url of the on-premise service you want to access. In my case, I would give “http://10.100.40.44:8085/”. Now you can access the on-premise protected API like a normal HTTP request from cloud as shown below:

Congratulations you have now successfully created an Azure Logic App workflow that make GET/POST requests to On-Premise Services from Cloud using Secure Azure data gateways.

--

--

Navaneeth Sen

Software Engineer | Java, Python, Linux, Unix | AI, DVB | 💻 | Azure | PyTorch | Hackathons | Innovations | Highly Inquisitive and Curious