Blog Post

Azure PaaS Blog
2 MIN READ

Import Logic Apps (Standard) into Azure API Management

Sravani_Masapalli's avatar
Jan 13, 2022

API Management (APIM) is a way to create consistent and modern API gateways for existing back-end services. API Management helps organizations publish APIs to external, partner, and internal developers to unlock the potential of their data and services.

 

Azure Logic Apps is a cloud-based platform for creating and running automated logic app workflows that integrate your apps, data, services, and systems. With this platform, you can quickly develop highly scalable integration solutions for your enterprise and business-to-business (B2B) scenarios. To create a logic app, you use either the Logic App (Consumption) resource type or the Logic App (Standard) resource type. The Consumption resource type runs in the multi-tenant Azure Logic Apps or integration service environment, while the Standard resource type runs in single-tenant Azure Logic Apps environment.

 

This blog walks you through step by step on how to import Logic App (Standard) into Azure API Management. For how to import a Logic App (Consumption) into APIM, please refer to our public doc

 

Prerequisites—

 

The functionality to directly import from “Create from Azure Resource” is not available for workflows in Logic App (Standard) yet. We will demonstrate how to overcome this limitation in the followings.

 

Steps to import Logic App (Standard) into Azure API Management:

========================================================

 

As an alternative, to import the Logic App (Standard) we can manually register the Request trigger URL from workflows as a blank API in APIM service.

 

  1. We will need to divide the Request URL(i.e., Logic Apps Workflow URL) into two parts to put into the backend and frontend.

For example – this request URL can be broken into 2 segments—


https://stdla1.azurewebsites.net:443/api/TESTWF1/triggers/manual/invoke?api-version=2020-05-01-pre...>

 

  

  1. We need to place the part 1 URL into either Webservice URL Or Backend HTTP(s) endpoint by clicking on highlighted part as portrayed below

 

 Or

  • Place the part 1 URL of Workflow URL into the backend HTTP(s) endpoint by clicking on highlighted part as portrayed below

 

  • Then select target as HTTP(s) endpoint and click on override and provide the first part of your request URL as shown in the screenshot.

 

  1. Next add part 2 URL into the frontend section as depicted in the screenshot below.

 

 

  1. On testing, it gives 200 OK response.

 

Similarly, you can add various workflows as different operations in the same API. This method is useful for Logic App (Standard) Workflows.

Happy Learning!! 🙂

 

Updated Jan 09, 2022
Version 1.0
  • deepakk_2k's avatar
    deepakk_2k
    Copper Contributor

    Hi,

    I have an alternative method, configuring the policy.

        <inbound>

            <base />

            <set-backend-service base-url="https://<stand-la>.azurewebsites.net:443/api/<wf-name>/triggers/When_a_HTTP_request_is_received/invoke" />

            <rewrite-uri template="@($"?api-version=2022-05-01&sp=%2Ftriggers%2F<When_a_HTTP_request_is_received>%2Frun&sv=1.0&sig=<xxxxx>")" copy-unmatched-params="false" />

        </inbound>

    Hope it helps,

    Deepak.

  • TrevorM1570's avatar
    TrevorM1570
    Copper Contributor

    Thanks very much, I've been trying to get a standard LA into APIM for 2 days! This worked, however are there any down sides? Is it prone to break?

     

    I was using the full url as the end point and was always getting a 401 even though my logic app doesn't require authentication.

     

    Is there also a way to accomplish it with setting up managed identities on the LA?

  • MikeTech's avatar
    MikeTech
    Copper Contributor

    Hi there

    I have followed the approach described in the blog to setup My logic app standard with API Management. I've just secured my API management with AD B2C authentication. Since doing this I now have two authentications for both API management and one that comes out of the box with logic all (sig). 

    When I put a valid token in I get this error:

    "message": "The request has both SAS authentication scheme and 'Bearer' authorization scheme. Only one scheme should be used."

    Is there any approach to solve this conflict. All the policies I've seen for handling authentication with logic app are based on the non-standard. I guess the question is, does Secure API Management support Logic App standard?