Unable to Delete the Delegation from Subnet

Shreekumar Suggamad 146 Reputation points
2022-04-12T12:57:06.08+00:00

We are getting this error After editing the Subnet and setting the Delegation to "None"

192381-image.png

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

Accepted answer
  1. GitaraniSharma-MSFT 50,096 Reputation points Microsoft Employee Moderator
    2022-04-19T12:25:09.077+00:00

    Hello @Shreekumar Suggamad ,

    Apologies for the delay in response.

    I understand that you are unable to delete a subnet delegation and receiving the below error:
    Error: 'Subnet xxxxxx/providers/Microsoft.Network/virtualNetworks/xxxxx/subnets/xxx'>xxxx-subnet requires any of the following delegation(s) [Microsoft.Web/serverFarms] to reference service association link /subscriptions/xxxxxxxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxxxx/subnets/xxxx/serviceAssociationLinks/AppServiceLink.'

    Could you please confirm if you had a Vnet integration between the snet-svf-nprod-dev subnet and a Web App and it was disconnected properly?

    The above error occurs because when you have VNet Integration between a subnet and a Web App (part of App Service Plan), in the backend there is link automatically created (AppServiceLink) and a default delegation on the specified subnet Microsoft.Web/serverFarm and if you delete the Web App/App Service Plan or set subnet delegation to none without disconnecting the VNet integration first, the link gets stuck in the backend and the delegation also, therefore it cannot be removed.

    We have a workaround which you can try to resolve this issue (may or may not work, depending on the situation):

    If you have already deleted the Web App, follow steps 1 to 5.
    If the Web App hasn't been deleted yet, follow steps 3 to 5.

    1. Recreate the App Service Plan that you had (the one you used for VNet Integration) with the exact same name as before in the exact same region as the vnet.
    2. Recreate the Web App (name of web app does not matter, it is important only for the ASP)
    3. Recreate the VNet Integration from Web App > Networking Blade > New VNet Integration and select the specific subnet
    4. Properly remove the VNet Integration by hitting “Disconnect” in the Web App > Networking > VNet Integration.
    5. Now try and delete the subnet/vnet or set the Subnet Delegation to "none"

    If the above steps do not help in fixing your issue, we may need to raise a support ticket to get the Service Association Link (SAL) deleted from the backend. So if you have a support plan, I request you file a support ticket, else please do let us know, we will try and help you get a one-time free technical support.

    Kindly let us know if the above helped or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    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.

1 additional answer

Sort by: Most helpful
  1. Takahito Iwasa 4,851 Reputation points MVP Volunteer Moderator
    2022-04-12T22:12:18.723+00:00

    Hi, @Shreekumar Suggamad

    From your error message, I think it is related to the following Issue:
    https://github.com/MicrosoftDocs/azure-docs/issues/48902

    There are some troubleshooting tips.

    1. First, determine a similar problem.
    2. Next, try the countermeasure commands and operations described in the Issue comments.
    3. Finally, if that doesn't work, please contact Azure Support as described in the Issue comment.
    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.