Unable to delete VNet

Admin 20 Reputation points

Unable to delete a subnet

Failed to delete resource group popsmile-rg: Deletion of resource group 'xxxxxx-rg' failed as resources with identifiers 'Microsoft.Network/virtualNetworks/xxxxxx-44e0116872-vnet' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is '000c000c-00008919-4764-b7c8-356ed111111'. Please check audit logs for more details. (Code: ResourceGroupDeletionBlocked) Subnet popsmile-ad11ad57aa-dbsubnet is in use by /subscriptions/xxxxx/resourceGroups/xxxxxxx-rg/providers/Microsoft.Network/virtualNetworks/xxxxx-111111-vnet/subnets/popsmile-ad11ad57aa-dbsubnet/serviceAssociationLinks/be4f0cdd-2221-7b58-e9eb-1533a0f1cf71-sal and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet. (Code: InUseSubnetCannotBeDeleted, Target: /subscriptions/21af63bb-34f7-474c-a9f9-e29c12647c67/resourceGroups/popsmile-rg/providers/Microsoft.Network/virtualNetworks/xxxxx-44e0116872-vnet)

I try to delete connection how specified here https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal

Step 2: Delete connections

  1. On the page for your virtual network gateway, click Connections to view all connections to the gateway.
  2. Click the '...' on the row of the name of the connection, then select Delete from the dropdown.
  3. Click Yes to confirm that you want to delete the connection. If you have multiple connections, delete each connection.

But it returns always error.

So; I simply need to force the deleteing for all reosurces present in a resource-group.

Please, someone can help me?

Thanks in advance.


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.
2,308 questions
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 24,666 Reputation points Microsoft Employee


    Thank you for getting back and sharing the details above.

    As you were not able to select the Subnet Delegation to None I think the issue is here due to the orphaned serviceAssociationLink and in order to resolve this issue a support ticket will be required as a support engineer can request the backend team delete the orphaned serviceAssociationLink.

    If you have a support plan you may file a support ticket, else could you please send an email to azcommunity@microsoft.com with the below details and I will enable a one-time free support ticket for you in this case.

    Subject : Attn Chaitanya

    Thread URL: Link to this thread.

    Subscription ID

    Please let me know once you have done the same.

    Thank you!

    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

1 additional answer

Sort by: Most helpful
  1. Luca Lionetti 3,136 Reputation points


    Welcome to Microsoft Q&A community forum!

    try using this command in cloudshell

    Get-AzResourceGroup -Name "YOUR-RG-NAME" | Remove-AzResourceGroup -Force

    Hope this helps



    Please "Accept as Answer" and Upvote if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues