Cannot delete subnet delegated to Microsoft.PowerPlatform/vnetaccesslinks

CUIJPERS Gerard 0 Reputation points
2024-11-06T13:17:27.2866667+00:00

Hi

I am trying to delete a virtual network.

however, there is one subnet that is delegated to " Microsoft.PowerPlatform/vnetaccesslinks" which I cannot undelegate.

How do I delete the virtual network if the subnet cannot be undelegated?

I also tried via CLI:

az network vnet subnet update --resource-group xxx --name xxx --vnet-name xxx --remove delegations

And received the same error message:

(SubnetMissingRequiredDelegation) Subnet /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxx/subnets/xxx requires any of the following delegation(s) [Microsoft.PowerPlatform/vnetaccesslinks] to reference service association link /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxx/subnets/xxx/serviceAssociationLinks/PowerPlatformSAL.

Code: SubnetMissingRequiredDelegation

Message: Subnet /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxx/subnets/xxx requires any of the following delegation(s) [Microsoft.PowerPlatform/vnetaccesslinks] to reference service association link /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxx/subnets/xxx/serviceAssociationLinks/PowerPlatformSAL.

I also tried to remove the service associtation link via the rest-api

az rest --method delete --uri https://management.azure.com/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxx/subnets/xxx/providers/Microsoft.PowerPlatform/serviceAssociationLinks/default?api-version=2018-10-01

Does not work:

"Message":"No HTTP resource was found that matches the request URI

I looked at the Azure Resource Explorer

I see that the "allowDelete" flag is false
User's image

We use this network to test our IaaC deployment which now fails every time, so how can we remove this ?

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,539 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rohith Vinnakota 1,320 Reputation points Microsoft Vendor
    2024-11-06T21:03:54.34+00:00

    Hi CUIJPERS Gerard,

    Welcome to the Microsoft Q&A Platform. Thank you for posting a detailed question here.

    Given the error mentioned, it appears that the deletion process is being blocked on the backend. You will need to submit a support request to remove the subnet delegation and delete the Virtual Network. If you have a support plan, please file a support ticket. If you do not have a support plan and need assistance with one-time free technical support, please let us know.

    Refer to how create support ticket: How to create an Azure support request - Azure supportability | Microsoft Learn

    Another likely cause of this issue might be "When you remove the last gateway associated to a gateway/subnet, it might take up to 48-72 hours before you can delete the subnet or VNet."

    User's image

    Refer this documentation

    Similar issue: https://learn.microsoft.com/en-us/answers/questions/1290926/cannot-delete-subnet-delegated-to-microsoft-powerp

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

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