Thank you for reaching out and apologies for the delayed response here.
The suggested workaround in this case is as mentioned here.
Workaround:
- 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
Reason for this Error:
The new VNET integration feature (Regional Vnet Integration) must set locks on subnets in the Network Resource Provider, we set these locks by putting a structure called a Service Association Link 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.
If you have forgotten the name, you can use Get-AzDeletedWebApp (Az.Websites) | Microsoft Learn to retrieve the app name. For getting the details of the app service plan, you can go to Resource explorer from your portal. After going, you can go to the subnet details and you can get the details of previous app service plan in which previous integrated web app is hosted as shown below.
If above work around does not help then a support request will be required here to remove the subnet delegation and to delete the Virtual Network.
Could you please send an email to azcommunity@microsoft.com with the details below so that I can 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.
Hope this helps! Please let me know if you have any additional questions. Thank you!
I hope this has been helpful! Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!