Share via

Static Web App linked Function App backend returns 404 on /api/* routes

Dean Ackerman 0 Reputation points
2026-04-12T20:38:51.0166667+00:00

I have an Azure Static Web App named smarttraderai-portal-2026 and a linked Azure Function App named smarttraderai-api-2026v3 in resource group SmartTraderAI-portal-rg.

Current verified state:

  • Static Web App APIs page shows Production linked to Function App smarttraderai-api-2026v3
  • Function App smarttraderai-api-2026v3 shows enabled HTTP functions in Azure:
    • admin-users
    • admin-log-summaries
    • admin-trade-signals
    • logs-upload
    • profile-bootstrap
  • Static Web App GitHub workflow is configured for external linked backend with api_location: ""
  • Static Web App deploy succeeds
  • Function App package is deployed successfully and site/wwwroot contains:
    • host.json
    • package.json
    • package-lock.json
    • dist
    • node_modules
  • The Function App is running and functions are loaded

Problem:

Expected:

  • /api/* requests on the Static Web App should forward to the linked Function App backend

Actual:

  • Static Web App returns 404 Not Found

Already attempted:

  • unlink and relink backend multiple times
  • removed managed SWA API deployment from workflow
  • set api_location to ""
  • redeployed Static Web App
  • recreated Function App backend
  • verified backend functions are present and enabled

Resources:

  • Subscription: Pay-As-You-Go
  • Resource Group: SmartTraderAI-portal-rg
  • Static Web App: smarttraderai-portal-2026
  • Function App: smarttraderai-api-2026v3
  • Static Web App hostname: icy-dune-0882d5210.1.azurestaticapps.net

Has anyone seen linked backend routing fail like this even when the SWA APIs page shows the correct linked Function App and the backend functions are visible/enabled?

Azure Static Web Apps
Azure Static Web Apps

An Azure service that provides streamlined full-stack web app development.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.