Friday Fact: Logic Apps in VS Code fail to save if the Designer can’t resolve your API ID

  • Luis Rigueira
  • Mar 28, 2025
  • 3 min read

When building Logic Apps in VS Code, there’s a key detail you should understand—especially when using the Designer. It’s not just about how the Designer looks, but how it behaves depending on your setup.

Let’s say your Logic App needs to connect to an operation in API Management (APIM). The process is pretty straightforward:

  • Search for the APIM connector in the Designer, select your APIM instance, give the connection a name, and choose the API you want to work with.
  • This creates an entry like this in your connections.json:
"apiManagementConnections": {
  "apiManagementOperation": {
    "apiId": "/subscriptions/xxxx-xxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/test-dev-rg/providers/Microsoft.ApiManagement/service/apim-dev/apis/postapi",
    "baseUrl": "https://apim-test.demo.pt/dev/operation/createpost",
    "subscriptionKey": "@appsetting('apiManagementOperation_SubscriptionKey')",
    "displayName": "CN-APIM"
  }
}

Now, if you prefer using app settings instead of hardcoding values (which is a best practice), your connection would look like this:

"apiManagementConnections": {
  "apiManagementOperation": {
    "apiId": "@appsetting('post-api-Id')",
    "baseUrl": "@appsetting('post-api-baseUrl')",
    "subscriptionKey": "@appsetting('post-api-SubscriptionKey')",
    "displayName": "CN-APIM",
    "authentication": {
      "type": "ManagedServiceIdentity"
    }
  }
}

📝 One-Minute Brief

Logic Apps Standard workflows in Visual Studio Code may fail to save when the designer can’t resolve an API ID. This Friday Fact explains why this validation happens, how it impacts local development, and what developers can do to fix the issue.

After deploying your Logic App, make sure the app settings match the values you previously hardcoded. If they don’t, the Logic App may behave unexpectedly.

Now comes a common gotcha. While you’re still developing, you might switch to app settings early. At that point, the Designer may stop working correctly. This happens because the apiId now points to a variable instead of a real API path. As a result, changes such as adding variables or scopes may fail to save. Frustrating, right?

The fix is simple: just add those app setting values to your local local.settings.json file. For example:

"post-api-Id": "/subscriptions/xxxx-xxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/test-dev-rg/providers/Microsoft.ApiManagement/service/apim-dev/apis/postapi",
"post-api-baseUrl": "https://apim-test.demo.pt/dev/operation/createpost"

With this in place, the Designer will recognize the API again, and you’ll be able to make changes and save without issues.

Bonus tip:

  • If your APIM lives in a different subscription than the rest of your resources, you can also update the WORKFLOWS_SUBSCRIPTION_ID value in local.settings.json to match the subscription where your APIM is. That’ll resolve the issue where the Designer isn’t displaying your API correctly.

Hope you enjoyed this Friday Fact!

To lazy to read? We’ve got you covered! Check out our video version of this content!

Hope you find this helpful! If you enjoyed the content or found it useful and wish to support our efforts to create more, you can contribute towards purchasing a Star Wars Lego for Sandro’s son!

Buy me a coffee
Author: Luis Rigueira

Luis Rigueira is a Enterprise Integration Consultant at DevScope

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