Logic Apps Best Practices, Tips and Tricks: #45 Calling API Management in a different subscription on LA Standard

  • Sandro Pereira
  • Dec 17, 2024
  • 4 min read

Welcome again to another Logic Apps Best Practices, Tips, and Tricks post. Today, we will discuss how to call an API exposed in API Management from a different subscription using the in-app API Management connector in Logic App Standard.

📝 One-Minute Brief

Calling Azure API Management from a Logic App Standard hosted in a different subscription can introduce authentication, networking, and configuration challenges. In this post, part of the Logic Apps Best Practices, Tips and Tricks series, I explain how to correctly call API Management across subscriptions in Logic Apps Standard. The article highlights common pitfalls and best practices to ensure secure, reliable, and maintainable integrations.

Calling API Management in a different subscription on Logic App Standard

On May 8, 2023, Microsoft announced the availability of the API Management (APIM) connector for Logic Apps Standard. This connector lets you consume APIs hosted in Azure API Management directly from Logic Apps Standard workflows.

Through the APIM connector, you get the same visual, low‑code experience offered by other built‑in connectors. As a result, you can easily extend out‑of‑the‑box connectors and consume your backend services and APIs. Bringing APIM connector support to Logic Apps Standard also allows you to:

  • Connect to your on-premises or VNET-hosted services and APIs. 
  • Because it is a built-in connector, it runs on the same computer as the Logic Apps runtime, providing performance benefits at no extra cost.

But there is a catch! By design, and with that, I mean using the Logic App designer when we are creating the new connection:

Add an action

We can only select an API Management instance that is present in the same subscription:

Call Azure API Management

All four API Management instances you see in the image belong to my personal Azure subscription. That same subscription also hosts the Logic Apps Standard deployment.

However, this raises an important question. What happens if you want to call an API Management instance in a different subscription within your organization? Can you still use the API Management in‑app connector, or do you need to rely on the HTTP connector instead?

In most solutions I’ve seen, developers choose the HTTP connector because it feels simple and flexible. You can do almost everything with it. In many cases, developers either don’t realize that the API Management in‑app connector exists or don’t know how to use it in cross‑subscription scenarios.

Although the HTTP connector works, it also introduces additional constraints and challenges. These issues often surface later, when teams try to keep their Logic Apps Standard workflows secure, maintainable, and aligned with best practices.

Many people are unaware that with a simple tweak, we can use the API Management in-app connector to call an API exposed in an API Management service instance on a different subscription! To accomplish that, we need to:

  • Access to our Logic App Standard connections under Workflows > Connections > JSON View.
    • Notice that in the picture, I already have two connections pointing to two different subscriptions.
JSON View
  • And manually add a new API Management connection with the following format:
"apiManagementOperation": {
            "apiId": "/subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.ApiManagement/service/<apimInstanceName>/apis/<apiName>",
            "baseUrl": "<apiBaseUrl>",
            "displayName": "<connectorName>",
            "subscriptionKey": "@appsetting('apiManagementOperation_SubscriptionKey')"
        }

Make sure you replace the following tags:

  • <subscriptionId>: with the Subscription ID where the API Management service instance is deployed.
  • <resourceGroupName>: with the Resource Group name where the API Management service instance is deployed.
  • <apimInstanceName>: with the API Management service instance name.
  • <apiName>: with the API name you want to call.
  • <apiBaseUrl>: with the API base URL, you want to call.
  • And the <connectorName>: and of course, make sure you give a proper name to the connector.

Now that we have added a new API Management connection, we can select the API Management connector we want to use:

Change connection

And by doing that, we can connect to different APIs that can be deployed in an APIM service instance deployed in the same subscription or in different subscriptions, as you can see below:

API Management operations
API Management operations

Kudos to Divya Swarnkar and Harold Campos for the help in setting up this functionality!

I hope you find this helpful! If you liked the content or found it helpful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

buy me a coffee
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top