Share via

Static Web App cannot be deleted — orphaned `linkedBackend` is readable but returns 404 on DELETE/unlink

Trenton Scott 0 Reputation points
2026-05-12T23:34:39.5933333+00:00

I have a Standard-tier Static Web App that cannot be deleted because of an orphaned linkedBackend record. The link points to a Web App that no longer exists, and the record is readable but unaddressable by the write/delete path. This has been blocking subscription cancellation for months.

Resource

  • Subscription: <SUB_ID>
  • ResourceXXXXXXXXXXXX
  • SKU: Standard, Region: eastus2
  • Only resource in the subscription

Symptom

Both direct DELETE on the SWA and resource-group cascade DELETE fail with the opaque error:


{"code":"ResourceOperationFailure",

"message":"The resource operation completed with terminal provisioning state 'Failed'.",

"details":[{"code":"Unspecified","message":""}]}

Root cause visible from ARM

The site has a build named preview holding a linkedBackends record backend1 pointing at:


/subscriptions/<SUB_ID>/resourceGroups/XXXXXX/providers/Microsoft.Web/sites/formflow-backend-104793

That target Web App no longer exists (confirmed via az resource list across all my subscriptions). The link is dangling.

The metadata is in an inconsistent state:

  • GET .../builds/preview/linkedBackends returns backend1 with provisioningState: Succeeded
  • DELETE .../builds/preview/linkedBackends/backend1404 NotFound on api-versions 2024-04-01, 2023-12-01, 2023-01-01, 2022-09-01, 2022-03-01, 2021-03-01
  • POST .../linkedBackends/backend1/unlink and .../builds/preview/linkedBackends/backend1/unlink404 NotFound / BadRequest

So the record exists from the read path but is unaddressable from the write path. Only the platform can clear it.

Confirmation the linked backend is what's blocking everything

Attempting to downgrade the SKU to Free returns a clear error pointing at the same record:


Sku is invalid. Free SKU is invalid. Linked Backends are not allowed in this SKU.

The following builds have linked backends configured: preview

The downgrade path enumerates backend1 correctly; only the unlink/delete path cannot remove it. This is consistent with corruption in the linkedBackends storage on the RP side.

Activity-log entries


2026-04-28T13:56:11Z  Microsoft.Web/staticSites/linkedBackends/unlink/action         Failed/NotFound  → {"error":{"code":"BadRequest","message":""}}

2026-04-28T13:56:11Z  Microsoft.Web/staticSites/builds/linkedBackends/unlink/action  Failed/NotFound  → {"error":{"code":"BadRequest","message":""}}

2026-04-28T13:56:10Z  Microsoft.Web/staticSites/builds/linkedBackends/delete         Failed/NotFound  → "Resource Not Found"

2026-04-28T14:01:24Z  Microsoft.Web/staticSites/builds/delete                        Failed           → Unspecified

What I have tried

  • DELETE on the Static Web App directly — Unspecified
  • DELETE on resource group formflow-rgUnspecified on staticSites/builds/delete
  • DELETE on linkedBackends/backend1 across 6 API versions — all 404
  • POST unlink action, both site- and build-scoped — 404 / BadRequest
  • PATCH SKU StandardFree — blocked by the dangling backend
  • Subscription cancel via Microsoft.Subscription/cancel — blocked: ResourcesExistingOnSubscription
  • Billing-API cancel via Microsoft.Billing/.../billingSubscriptions/.../cancel — not supported for Individual MCA
  • DELETE builds/preview directly — accepted, but the cascading flow fails on the same record

Questions

  1. Is there a supported way to force-remove a dangling linkedBackend whose target resource no longer exists, when both DELETE and the unlink action return 404 on the record itself?
  2. If not, can someone from the Static Web Apps RP / Engineering team server-side clear the backend1 record on build preview of formflow-app-prod in subscription <SUB_ID> so the SWA can be deleted and the subscription closed?

I have been dealing with this issue since March - any way to refund the charges I have incurred since it became defective in mid March?

edited PII info

Azure Static Web Apps
Azure Static Web Apps

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

0 comments No comments

Answer accepted by question author

  1. Praneeth Maddali 9,515 Reputation points Microsoft External Staff Moderator
    2026-05-12T23:58:30.56+00:00

    Hi @Trenton Scott

    As discussed offline, we will proceed with closure upon your confirmation. If you have any further questions, please let me know in the "comments" section, and I will be glad to assist you.

     

    Was this answer helpful?

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.