How to delete service Association Link for Microsoft.DBforPostgreSQL/flexibleServers in Azure

Viewed 1260

How can I delete an Azure subnet after it has been associated to Microsoft.DBforPostgreSQL/flexibleServers? When I try to delete the subnet is says:

Failed to delete subnet 'db-subnet'. 
Error: Subnet db-subnet is in use by application-vnet/db-subnet/db-subnet-service-association-link and cannot be deleted. 
In order to delete the subnet, delete all the resources within the subnet.   
See aka.ms/deletesubnet.`

When I try to delete the service association link it gives me not authorized error:

Azure Error: UnauthorizedClientApplication
Message: Unauthorized client application id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

I tried from bash, powershell, REST API and nothing. It does not matter if the PostgreSQL flexible server is present or deleted it gives me the same error and not I am stuck with two subnets that cannot be deleted.

1 Answers
Related