Skip to content
8 min read Updated

Logic App Standard 403 Forbidden with Private Storage: Fix

Logic App Standard failed every boot with 403 Forbidden. Private Storage needs four Private Endpoints (blob, file, queue, table), not two. Terraform fix inside.


Disclosure: This post contains Amazon affiliate links (marked with *). As an Amazon Associate I earn from qualifying purchases. Buying through them costs you nothing extra.

Logic App Standard is the hosting model to pick when workflows need VNet integration and a predictable App Service Plan. In a hardened Azure landing zone, its Storage Account is not reachable from the public internet and sits behind Private Endpoints.

The deployment succeeded. Resource Group, Storage Account, private endpoints, DNS zones: everything planned cleanly and applied without an error. Then the workflow host refused to start. Every boot ended in the same 403 Forbidden, roughly 600 milliseconds after the host registered its blob webhook endpoint.

This is the postmortem: why it happened, why three plausible fixes did not help, what finally exposed the cause, and how the generic rebuild now ships the correct configuration by default.

View the base source code on GitHub

The Symptom

The portal designer showed generic failures (renderComponentIntoRoot, Workflow validation failed), none of which pointed anywhere useful. A direct API call against the host runtime revealed the real error:

Encountered an error (ServiceUnavailable) from host runtime.

The Kudu host status endpoint (/hostruntime/admin/host/status) confirmed the host was not just having a bad moment:

{
  "state": "Error",
  "errors": [
    "Microsoft.WindowsAzure.ResourceStack: Unexpected HTTP status code 'Forbidden'. The remote server returned an error: (403) Forbidden."
  ]
}

The Forbidden came from Storage itself, and it came back fast. That timing was the first real clue: no timeout, no firewall blackhole, no DNS hang, just a prompt, deliberate rejection.

The Root Cause

A Logic App Standard is a Functions host under the hood (app kind functionapp,workflowapp). Its host runtime needs Storage for more than your workflow content. It uses four Storage subresources during normal operation:

SubresourceUsed for
FileContent share: host.json, connections.json, workflow definitions
BlobExtension-bundle cache, application logs
QueueInternal WebJobs coordination: scale controller, trigger bookkeeping
TableInternal WebJobs metadata

Our wrapper built private endpoints for Blob and File, the two that look obviously necessary: the File share holds the content and Blob holds the bundle cache. Queue and Table were forgotten.

The consequence is subtle. DNS for *.queue.core.windows.net and *.table.core.windows.net resolved to the public IP, because without a private endpoint there is no private DNS record. But the Storage Account had publicNetworkAccess disabled, so Storage itself rejected every Queue or Table request on the public endpoint with 403 Forbidden, instantly. That is why the failure appeared ~600 ms after boot: Storage denies fast, it does not hang.

Why Three Plausible Fixes Failed

Each attempt was reasonable, and each targeted the wrong layer:

  1. RG Contributor for the Managed Identity. RBAC was never the problem. The Storage network rules decide whether a request may reach the account at all, based on its network origin, before any role assignment matters. Adding permissions changed nothing.

  2. vnet_route_all_enabled = false. This flag only controls whether all outbound traffic goes through the VNet integration. Either way, the Queue and Table calls targeted the public endpoint because of the missing private DNS records, and that endpoint was disabled. Changing the route did not change the destination.

  3. Storage data-plane RBAC (Blob/Queue/Table Data Contributor). Permissions are useless when the request is rejected at the network layer before RBAC is evaluated.

What finally worked was Application Insights. The Kudu logs showed only the short error with no stack trace. Attaching App Insights temporarily revealed the full exception stack and the failing method (WorkflowExtensionProvider.Initialize), and only then was the real dependency visible.

The lesson: when a private Storage Account rejects a request with 403, the problem is almost never identity. It is reachability, specifically which DNS name resolves to which IP.

The Fix

Two additional Private Endpoints on the same Storage Account, plus their Private DNS zone integration:

  • pe-st-queue → privatelink.queue.core.windows.net
  • pe-st-table → privatelink.table.core.windows.net

The private DNS zones already existed centrally; they just were not attached to this Storage Account. Once Queue and Table resolved to private IPs, the host booted cleanly on the next restart.

The rule for next time: a Logic App Standard or Function App with private Storage needs all four Storage subresources behind Private Endpoints, not only the ones that look content-related. Queue and Table are host-internal infrastructure. They appear in no configuration file you edit, which is why they get forgotten.

The Generic Rebuild

Instead of leaving the fix in a wrapper module, the generic template now creates all four by default. The private endpoints are a single for_each over the subresource list:

locals {
  storage_subresources = ["blob", "file", "queue", "table"]
}

resource "azurerm_private_endpoint" "storage" {
  for_each            = toset(local.storage_subresources)
  name                = "pe-${local.storage_name}-${each.key}"
  location            = azurerm_resource_group.main.location
  resource_group_name = azurerm_resource_group.main.name
  subnet_id           = azurerm_subnet.private_endpoints.id

  private_service_connection {
    name                           = "psc-${local.storage_name}-${each.key}"
    private_connection_resource_id = azurerm_storage_account.main.id
    subresource_names              = [each.key]
    is_manual_connection           = false
  }

  private_dns_zone_group {
    name                 = "dns-${each.key}"
    private_dns_zone_ids = [azurerm_private_dns_zone.main[each.key].id]
  }
}

Adding a fifth subresource (e.g. dfs for Data Lake) is one list entry instead of a copy-pasted resource block.

The DNS zones are created and linked to the VNet in the same pass, so *.queue.core.windows.net resolves privately without touching your DNS infrastructure:

locals {
  private_dns_zones = {
    blob  = "privatelink.blob.core.windows.net"
    file  = "privatelink.file.core.windows.net"
    queue = "privatelink.queue.core.windows.net"
    table = "privatelink.table.core.windows.net"
    sites = "privatelink.azurewebsites.net"
  }
}

resource "azurerm_private_dns_zone" "main" {
  for_each            = local.private_dns_zones
  name                = each.value
  resource_group_name = azurerm_resource_group.main.name
}

resource "azurerm_private_dns_zone_virtual_network_link" "main" {
  for_each              = local.private_dns_zones
  name                  = "link-${azurerm_virtual_network.main.name}"
  resource_group_name   = azurerm_resource_group.main.name
  private_dns_zone_name = azurerm_private_dns_zone.main[each.key].name
  virtual_network_id    = azurerm_virtual_network.main.id
}

Two more details from the fix are worth copying.

1. Order the dependency. The Logic App must not boot before its private endpoints exist, otherwise the first start races the network configuration:

resource "azurerm_logic_app_standard" "main" {
  # ...

  public_network_access     = "Disabled"
  virtual_network_subnet_id = azurerm_subnet.integration.id

  app_settings = merge(
    {
      "WEBSITE_CONTENTOVERVNET" = "1"
      "WEBSITE_VNET_ROUTE_ALL"  = "1"
    },
    var.app_settings
  )

  depends_on = [
    azurerm_private_endpoint.storage["blob"],
    azurerm_private_endpoint.storage["file"],
    azurerm_private_endpoint.storage["queue"],
    azurerm_private_endpoint.storage["table"],
  ]
}

WEBSITE_CONTENTOVERVNET = 1 tells the platform to reach the content share over the VNet integration instead of the public file endpoint.

2. Bootstrap the file share. A freshly deployed Standard Logic App boots against an empty share, and the workflow host and the portal designer both trip over that. The template uploads a minimal host.json and connections.json into site/wwwroot during the first apply. The definitions are empty, but the host contract is valid:

resource "local_file" "host_json" {
  filename = "${path.module}/.bootstrap-content/host.json"
  content = jsonencode({
    version = "2.0"
    extensionBundle = {
      id      = "Microsoft.Azure.Functions.ExtensionBundle.Workflows"
      version = "[1.*, 2.0.0)"
    }
  })
}

The Checklist

When you wire a Logic App Standard or Function App to a private Storage Account:

  1. File private endpoint: content share
  2. Blob private endpoint: bundle cache and logs
  3. Queue private endpoint: host-internal coordination
  4. Table private endpoint: host-internal metadata
  5. Sites private endpoint on the Logic App itself (privatelink.azurewebsites.net)
  6. Private DNS zones for all five, linked to the VNet
  7. Public network access disabled on the Storage Account (public_network_access_enabled = false) and the Logic App (public_network_access = "Disabled")
  8. WEBSITE_CONTENTOVERVNET = 1 so content is served over the VNet
  9. depends_on from the Logic App to the private endpoints

Encode It, Don’t Remember It

For Logic Apps Standard, a private endpoint per Storage subresource is a hard requirement of the host runtime. Microsoft’s documentation for private Storage lists all four, but Queue and Table never show up in a file you edit, so they get skipped until a 403 Forbidden appears in the Kudu logs at every boot.

The fix is deterministic, and it now lives in the template instead of in the memory of an engineer who already paid for it once.

If DNS resolution and private-endpoint plumbing like this is the part that still feels like guesswork, Netzwerke: Verstehen, Einrichten, Administrieren* is the reference I keep coming back to for the underlying concepts.

Was this helpful?
Share
DW

David Woitzik

Hybrid Cloud Engineer

I work mostly with Azure, Terraform, and Zero-Trust network design, and publish the Terraform templates and write-ups I wanted when I was solving the same problems.

Keep reading

More like this in your inbox

New Terraform modules and articles by email. No spam.