Share via

Can't delete vnet

(Chip) Ronald Olsen 0 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.


1 answer

Sort by: Most helpful
  1. TP 156.8K 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?

    0 comments No comments

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.