Not able to delete aSubnet

Dennis 20 Reputation points
2023-08-18T22:49:52.9+00:00

I'm not able to delete a subnet after recreating previously removed App Service Plan and web apps.

I've already tried steps described on https://learn.microsoft.com/en-us/answers/questions/1006908/not-able-to-delete-the-subnet

I recreated the App Service Plan and all Web Apps with the same names (recreated with a script, so I'm sure names are the same).

When I try to recreate VNet integrations I get this:

  1. Azure Portal:
    Not available for integration (subnet must be empty and not already delegated)
  2. Azure Cli:
    az : ERROR: Subnet {subnet} in VNET {vnet} is already occupied by service

When I try to remove delegations from the Subnet I get this:

  1. Azure Portal:
    Failed to save subnet 'westus-nexlogica-nxldev-workspaces-dmzvsubnet'. Error: 'Subnet {resource_group}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet} requires any of the following delegation(s) [Microsoft.Web/serverFarms] to reference service association link /subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}/serviceAssociationLinks/AppServiceLink.'
  2. Azure CLI:
    az : ERROR: (SubnetMissingRequiredDelegation) Subnet /subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet} requires any of the following delegation(s) [Microsoft.Web/serverFarms] to reference service association link /subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}/serviceAssociationLinks/AppServiceLink.

Please provide instructions (other than described in question 1006908) for removing the orphaned subnet or remove the subnet from the resource group from your side.

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,555 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 26,706 Reputation points Microsoft Employee
    2023-08-18T23:31:46.9433333+00:00

    @Dennis

    Welcome to the Microsoft Q&A forum.

    Thank you for sharing the details above and letting us know that you have already tried the recommended steps to remove the subnet. The solution in this case will be to create a support request, as a support engineer can request the backend team to remove the subnet delegation. 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 so that I can enable a one-time free support request for you.

    Subject : Attn Chaitanya

    Thread URL: Link to this thread.

    Subscription ID

    Please let me know once you have done the same.


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

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. RAHMAN, Faslu 0 Reputation points
    2023-11-14T10:51:28.84+00:00

    Getting the same problem, contacted Microsoft Support since 3-4 days, still awaiting for a response!!!!!!!

    0 comments No comments

  2. Dennis 20 Reputation points
    2023-11-14T15:07:57.09+00:00

    In my case MS Support was able to resolve the issue, but this happend to me again in another environment, and after a few days I was able to remove the orphaned subnet without contacting Support, so if you're already waiting 4 days I would recommend to try to delete it once again.

    0 comments No comments

Your answer

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