Share via

Can't delete vnet

(Chip) Ronald Olsen 20 Reputation points
2026-06-03T20:17:55.63+00:00

Failed to delete virtual network 'vnXX-deXX-deXisiontXXX'. Error: Subnet app-01 is in use by /subscriptions/c0d935XX-9aXX-49XX-a1X-eae99b68XXXX/resourceGroups/rg-vneX-dXXX-decisiontXXX/providers/Microsoft.Network/virtXXXNetwoXXX/vnet-deXX-decisiontXXX/subnets/app-01/serviceAssociationLinks/AppServiceLXXX

Link and all associated setup was removed some time ago. VNet remains.

Azure Virtual Network
Azure Virtual Network

An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.


Answer accepted by question author

TP 157.5K Reputation points Volunteer Moderator
2026-06-03T22:34:38.4233333+00:00

Hi,

Please run command similar to below in Azure Cloud Shell (Bash mode) to purge unused Service Association Link (SAL). Substitute SubscriptionId, Location, SubnetId. Subnet Id can be found by navigating to your subnet in portal and clicking the Copy icon next to Subnet ID

az rest --method POST \
     --uri "/subscriptions/<SubscriptionId>/providers/Microsoft.Web/locations/<Location>/purgeUnusedVirtualNetworkIntegration?api-version=2024-04-01" \
     --body "{'subnetResourceId': '<SubnetId>'}"

You should see output similar to below:

User's image

Once you have completed the above, try the delete again.

Please click Accept Answer and upvote if the above was helpful.

Thanks.

-TP

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Golla Venkata Pavani 6,085 Reputation points Microsoft External Staff Moderator
    2026-06-04T17:29:53.5066667+00:00

    Hii @(Chip) Ronald Olsen

    From the backend investigation, we found that SAL not orphaned, subnet apX-0X in VNet vneX-deXX-decXsiontXXX is actively occupied by service app-decisiontree-poc (409 Conflict, ExtendedCode 55914).

    Remediation steps: You must first disconnect VNET integration from the active app before the SAL can be released:

    1. Disconnect VNET Integration from the active app:
      • Portal: Navigate to App Service apX-deXXsiontXXX-pXX > Networking > VNet Integration > Disconnect
      • CLI: az webapp vnet-integration remove --name apX-deXXsiontXXX-pXX --resource-group <app-resource-group>
    2. If the app is no longer needed, delete it entirely:
      • az webapp delete --name apX-deXXsiontXXX-pXX --resource-group <app-resource-group>
    3. If the SAL persists after disconnecting, use the self-serve purge API:
         az rest --method POST \
              --uri "/subscriptions/c0d93XXX-9aba-49XX-a1XX-eae99b682XXX/providers/Microsoft.Web/locations/eastus2/purgeUnusedVirtualNetworkIntegration?api-version=2024-04-01" \
              --body '{"subnetResourceId": "/subscriptions/c0d93XXX-9aba-4930-a1XX-eae99b68XXXX/resourceGroups/rg-vnet-deXX-decisiontXXX/providers/Microsoft.Network/virtualNetworks/vneX-deXX-decXsiontXXX/subnets/app-XX"}'
      
      Kindly let us know if the above helps or you need further assistance on this issue.   Please "accept" if the information helped you. This will help us and others in the community as well.

    Was this answer 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.