Share via

How to delete an orphaned service association link

Chris Jarrett 0 Reputation points
2026-03-23T02:04:32.96+00:00

I have a subnet that I need to delete. However, deletion is blocked because the subnet was originally tied to a managed devops pool.

The pool no longer exists, but there is a service association link that apparently is still present and blocking deletion of my subnet.

Online, the answer seems to be "go to support tickets and request deletion".

We are on a startup plan and do not have access to the paid support.

Can someone please advise on an alternative method so I can delete my subnet?

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 answers

Sort by: Most helpful
  1. Praneeth Maddali 7,315 Reputation points Microsoft External Staff Moderator
    2026-03-23T21:10:35.1066667+00:00

    Hi @Chris Jarrett

    Thank you for sharing the requested details by private message. This requires intervention from the development team, and we have already removed the orphaned service area link from the system. You can now proceed with the deletion.

    Don't forget to click "Accept Answer". This can be helpful for other members of the community.

    If you have any other questions, please let me know in the comments and I will gladly help you.


  2. Q&A Assist
    2026-03-23T02:04:55.92+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The subnet is blocked by a lingering service association link (SAL) from the deleted Managed DevOps Pool. The SAL must be removed before the subnet can be deleted.

    Use these steps:

    1. Identify the blocking service association link
      • Run the diagnostic subnet show to list service association links:
         az network vnet subnet show \
             --resource-group <resource-group> \
             --vnet-name <vnet-name> \
             --name <subnet-name> \
             --query "serviceAssociationLinks[].{link:link, linkedResourceType:linkedResourceType}" \
             --output table
      
      • Confirm that the linkedResourceType corresponds to the Managed DevOps Pools integration (a service that injected agents into the subnet).
    2. Ensure no resource locks are blocking cleanup
      • If a Delete lock exists on the virtual network or subnet, remove it temporarily. A Delete lock prevents the platform (and Managed DevOps Pools) from cleaning up the SAL and can lead to InUseSubnetCannotBeDeleted and a “subnet in locked state” scenario.
      • After removing the lock, retry any pending pool update/cleanup if applicable. If the pool is already deleted, proceed to step 3.
    3. Explicitly delete the service association link resource
      • SALs are exposed as child resources of the subnet. Use az resource delete with the SAL resource ID. The pattern (from similar ACI/App Service scenarios) is:
         az resource delete --ids \
           /subscriptions/<subscription-id>/resourceGroups/<resource-group>\
           /providers/Microsoft.Network/virtualNetworks/<vnet-name>/subnets/<subnet-name>\
           /providers/Microsoft.ContainerInstance/serviceAssociationLinks/default \
           --api-version 2018-10-01
      
      • For Managed DevOps Pools, adjust the provider segment to match the linkedResourceType returned in step 1 (for example, replace Microsoft.ContainerInstance with the provider used by Managed DevOps Pools). The key is to delete the SAL resource whose link and linkedResourceType you discovered.
    4. Verify that all other blockers are removed Before deleting the subnet, confirm there are no other blockers:
      • Private endpoints:
             az network vnet subnet show \
                 --resource-group <resource-group> \
                 --vnet-name <vnet-name> \
                 --name <subnet-name> \
                 --query "privateEndpoints[].id" \
                 --output tsv
        
        Delete any listed private endpoints.
      • Orphaned NICs:
             az network vnet subnet show \
                 --resource-group <resource-group> \
                 --vnet-name <vnet-name> \
                 --name <subnet-name> \
                 --query "ipConfigurations[].id" \
                 --output tsv
        
        Extract NIC names from the IDs and delete them:
             az network nic delete \
                 --resource-group <resource-group> \
                 --name <nic-name>
        
      • Delegations and service endpoints, if present, can be removed with az network vnet subnet update after dependent resources are cleaned up.
    5. Delete the subnet
      • Once the SAL and other blockers are removed, delete the subnet from the portal or via CLI:
         az network vnet subnet delete \
             --resource-group <resource-group> \
             --vnet-name <vnet-name> \
             --name <subnet-name>
      

    If the SAL still persists after these steps and no locks remain, the remaining option is to open an Azure support request (even for technical issues tied to platform cleanup) and reference the linkedResourceType and SAL link values from step 1.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.