This happens when you delete an App Service integrated into the VNet without removing the integration.
Reason for this Error:
The VNET integration feature must set locks on subnets in the Network Resource Provider, we set these locks by putting a structure called a Service Association Link(SAL) onto the Subnet, which is a privileged operation that only Microsoft.Web and some other internal Azure services have access to, this ends up being odd cases where these locks don't get cleaned up. The result is that the customer will have a subnet that cannot be deleted or used because a Service Association Link still exists on the subnet.
To delete this SAL from your end,
- Create App Service Plan with the same name as the deleted one
- Create App Service with the same name as the deleted one
- Link App Service with the VNET subnet
- Disconnect VNet from App Service -> Networking -> VNet integration -> Disconnect
- Delete subnet
- Then delete the AppService
In case the work around did not help
To delete this SAL, we will need a specialized 1:1 session, where a support engineer can delete this lock. If you have a support plan you may file a support ticket, else please do let us know, we will try and help you get a one-time free technical support.
Cheers,
Kapil
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.