{"id":40049,"date":"2021-01-21T00:21:04","date_gmt":"2021-01-21T07:21:04","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/premier-developer\/?p=40049"},"modified":"2021-01-11T10:28:16","modified_gmt":"2021-01-11T17:28:16","slug":"connecting-an-azure-logic-app-to-a-local-web-api","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/connecting-an-azure-logic-app-to-a-local-web-api\/","title":{"rendered":"Connecting an Azure Logic App to a local Web API"},"content":{"rendered":"<p><a class=\"x-hidden-focus\" href=\"https:\/\/www.linkedin.com\/in\/bryansoltis\/\" target=\"_blank\" rel=\"noopener noreferrer\">Bryan Soltis<\/a> demonstrates how you can test Logic Apps with your on-prem systems using a few cool tools and services.<\/p>\n<hr \/>\n<div class=\"blogperex\">Have you ever wanted to develop with Azure Logic Apps, but struggled to test things out until you\u2019ve deployed? Don\u2019t worry, you\u2019re not alone. Logic Apps are an extremely powerful low-code\/no-code solution for many problems, but do have some inherent limitations that may make things tricky when you\u2019re just starting out your project locally. In this article, I\u2019ll show you how you can test your Logic Apps with your on-prem systems using a few cool tools and services.<\/div>\n<div class=\"blogcontent\">\n<p>When it comes to Logic Apps, Azure has a ton of connectors to allow you to design your automation workflows to integrate to all sorts of systems. Nearly every major Microsoft service is there, along with a slew of 3<sup>rd<\/sup>\u00a0party components and services. And if those don\u2019t fit the bill, you can develop your own connectors to do just about anything you need to.<\/p>\n<p>A common step in Logic App integration is to develop a Web API to interact with other systems. The API usually handles the database connections, exposing methods for apps to consume. Developing that API locally almost always is the easiest path, especially when you\u2019re working with internal database\/systems. Add a Logic App into the mix, and now we have a challenge. How will our Logic App be able to access the local API? Unlike many other Azure services, Logic Apps aren\u2019t assigned a static IP address. This means they can\u2019t be let through a firewall\/gateway, causing network admins to lose it when it comes to keeping them secure.<\/p>\n<p>To get around this, we can easily 2 components to the mix, allowing us to connect our local Web API to the Logic App. These are the\u00a0<strong>ngrok<\/strong>\u00a0utility and an\u00a0<strong>Azure API Management Service<\/strong>.\u00a0<strong>ngrok<\/strong>\u00a0allows us to create a secure, temporary tunnel to our local Web API, with a unique URL.\u00a0<strong>APIM<\/strong>\u00a0allows us to then use that URL for an endpoint for the Logic App to call, allowing us to call our methods. Because APIM\u2019s can have static IPs, they can easily be whitelisted for any networks.<\/p>\n<p>Check out the step-by-step example <a href=\"https:\/\/soltisweb.com\/blog\/detail\/2020-05-20-connectinganazurelogicapptoalocalwebapi\">here<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this article, I\u2019ll show you how you can test your Logic Apps with your on-prem systems using a few cool tools and services.<\/p>\n","protected":false},"author":582,"featured_media":40050,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25],"tags":[60,385],"class_list":["post-40049","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-logic-apps","tag-webapi"],"acf":[],"blog_post_summary":"<p>In this article, I\u2019ll show you how you can test your Logic Apps with your on-prem systems using a few cool tools and services.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/40049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=40049"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/40049\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/40050"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=40049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=40049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=40049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}