Hi @Vishwa Teja Devarakonda
Even though you deleted the Web App, Azure App Service creates an underlying, invisible Network Intent Policy or maintains an active Service Association Link (SAL) on the subnet to preserve the integration.
Until that link or policy is broken, Azure locks the subnet to prevent accidental network disruption, which stops you from deleting the Virtual Network or the Resource Group.
Try the below steps to resolve the issue.
- Clear App service links via CLI Open your Azure CLI or Cloud Shell and run these commands.
Delete the Network Intent policy:
Run this command to check for and destroy any policies holding your subnet:
az network vnet subnet update \
--resource-group <Your-Resource-Group-Name> \
--vnet-name <Your-VNet-Name> \
--name <Your-Subnet-Name> \
--remove networkIntentPolicy
Clear subnet delegation:
Clear the subnet by running:
az network vnet subnet update \
--resource-group <Your-Resource-Group-Name> \
--vnet-name <Your-VNet-Name> \
--name <Your-Subnet-Name> \
--remove delegations
Once the commands have run successfully, try deleting the resource group again.
If the CLI throws an error or you prefer using the Azure Portal, you can create a dummy App service to release the lock.
- Create a Temporary Web App: Create a new, cheap (Basic or Premium) Web App in the exact same region as your stuck VNet. (You can put it in a temporary resource group).
- Re-integrate it: Go to the new Web App > Networking > VNet integration and connect it to the exact stuck Subnet.
- Disconnect it properly: Once connected successfully, wait 2 minutes. Then, click Disconnect inside the Web App's networking blade. This forces Azure to run its teardown scripts and cleanly wipe out the Service Association Link.
- Clean up: Delete the temporary Web App, then proceed to delete your stuck VNet and Resource Group.