Cannot delete subnet delegated to Microsoft.PowerPlatform/vnetaccesslinks

CUIJPERS Gerard 20 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.


Answer accepted by question author
rvinnakota 4,835 Reputation points Moderator
2024-12-09T16:50:23.7133333+00:00

Hi CUIJPERS Gerard,

I'm glad that Microsoft Support Team was able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution.

Please click "Accept" the answer as original posters help the community find answers faster by identifying the correct answer.

Issue :

 Cannot delete subnet delegated to Microsoft.PowerPlatform/vnetaccesslinks

Resolution :
The issue for me was that the resource provider "Microsoft.PowerPlatform" was already unregistered in the subscription.

Support found an error "AuthorizationFailed" (don't know where exactly), and they asked me to re-register the "Microsoft.PowerPlatform" resource provider for this subscription and try again. At first this didn't seem to do the trick, but after waiting an hour or so (could be more), I was successful in deleting the subnet with the delegation

Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

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.