Unable to delete VNet due to serviceAssociationLinks/AppServiceLink

Olzhas Satpayev 0 Reputation points
2025-04-24T12:09:33.0933333+00:00
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,720 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sindhuja Dasari 395 Reputation points Microsoft External Staff
    2025-04-24T13:17:48.1566667+00:00

    Hello Olzhas Satpayev

    I understand you are having trouble deleting a VNet due to service association links or App Service links. This can happen when those links cause dependencies that prevent deletion. Here’s what you can do:

    1.Check for Dependencies: Ensure that there are no resources still using the VNet. This includes any virtual machines, load balancers, application gateways, or Azure Container Instances.

    2.Change Subnet Delegation:

    • Navigate to the subnet in the Azure Portal.
    • Change the subnet delegation to None.

    3.Delete Network Profiles: Use the Azure CLI to delete any associated network profiles:

    az network profile delete --name <network-profile-name> --resource-group <resource-group-name>
    

    4.Delete Service Association Links: If the steps above don’t work and the error persists, you can try to remove the service association link explicitly using the following CLI command:

    az resource delete --ids /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/virtualNetworks/<vnet-name>/subnets/<subnet-name>/providers/Microsoft.Web/serviceAssociationLinks/AppServiceLink --api-version <api-version>
    

    Refer:

    Microsoft Documentation-Unable to delete VNet due to SAL


    Please don’t forget to close the thread by clicking "Accept the answer" and "Yes" wherever the information provided helps you, as this can be beneficial to other community members.

    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.