An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
Hello @Abdul Hameed A, sorry you’re stuck with that orphaned AKS serviceAssociationLink (SAL) blocking your subnet/VNet deletion. This is a known platform-state issue where the SAL’s "allowDelete": false prevents any client-side removal. Here’s what you can try next:
- Purge the orphaned SAL via Azure CLI Run the following (make sure you’re Owner on the subscription and no resource lock exists):
• If it succeeds, wait 10–15 minutes for the platform to finish cleanup, then retry deleting the subnet/VNet. • If you still get “UnauthorizedClientApplication”, double-check your login context (e.g. runaz resource delete \ --ids /subscriptions/<subID>/resourceGroups/rg-test-dev-networking/providers/Microsoft.Network/virtualNetworks/vnet-test-dev/subnets/snet-aks-pods/providers/Microsoft.Network/serviceAssociationLinks/AzureKubernetesService \ --api-version 2020-11-01az account show) and that you’re using the Microsoft.Network provider. - Workaround: Re-create + delete an AKS cluster Sometimes you can “attach” a fresh AKS cluster to the same vnet/subnet and then delete it normally, which cleans up the SAL: a.
az aks create --name tempCluster --resource-group rg-test-dev-networking --vnet-subnet-id /subscriptions/<sub>/…/snet-aks-pods --disable-rbac --generate-ssh-keysb.az aks delete --name tempCluster --resource-group rg-test-dev-networking --yes --no-waitThen retry deleting the subnet/VNet. - Last resort: Backend support removal Because
allowDelete=falseis controlled server-side, if the CLI purge doesn’t work and you can’t re-create an AKS cluster, you’ll need to file a free support request so the SAL can be manually purged on the backend.
— Reference Documentation —
• Troubleshoot orphaned SALs (including sample az resource delete):
• Subnet deletion blocked by orphaned App Service SAL (similar cleanup steps):
https://learn.microsoft.com/answers/a/12572408
Let me know:
• Did the az resource delete … --api-version 2020-11-01 call work or still error?
• Are there any resource locks on your subnet/VNet?
• Do you have Owner rights in that subscription?
With that info we can decide if a backend purge request is needed.
Note: This content was drafted with the help of an AI system. Please verify the information before relying on it for decision-making.