Environment
Subscription ID
b3f71006-5692-4090-8841-dd91c5ba03b2
``
Resource Group
Externo
Region
South Central US
Resources involved
NIC:
sec4us-site270
Public IP:
sec4us-site-ip
VNet:
Externo-vnet
Subnet:
default
Problem description
I am trying to delete a Resource Group that contains an old network stack.
The deletion is blocked because Azure reports that the Public IP is still attached to a Network Interface.
However:
- The Network Interface no longer shows any Public IP association.
- The Public IP no longer shows any NIC association.
- The NIC remains permanently in
Failed state.
- Any update operation on the NIC eventually goes to
Failed.
- Any delete operation on the NIC enters
Deleting, then returns to Failed.
- The Public IP cannot be deleted because Azure still believes it is attached to the NIC.
This appears to be a stale dependency/orphaned reference inside the Microsoft.Network Resource Provider.
Evidence
Public IP cannot be deleted
Direct DELETE against ARM:
az rest </span>
--method delete </span>
--url "https://management.azure.com/subscriptions/b3f71006-5692-4090-8841-dd91c5ba03b2/resourceGroups/Externo/providers/Microsoft.Network/publicIPAddresses/sec4us-site-ip?api-version=2023-09-01"
Result:
{
"error": {
"code": "PublicIPAddressCannotBeDeleted",
"message": "Public IP address ... can not be deleted since it is still allocated to resource .../networkInterfaces/sec4us-site270 ..."
}
}
Public IP object does NOT show any NIC attachment
az rest </span>
--method get </span>
--url "https://management.azure.com/subscriptions/b3f71006-5692-4090-8841-dd91c5ba03b2/resourceGroups/Externo/providers/Microsoft.Network/publicIPAddresses/sec4us-site-ip?api-version=2023-09-01"
Response:
{
"properties": {
"provisioningState": "Succeeded",
"ipAddress": "40.84.222.149",
"publicIPAllocationMethod": "Static"
}
}
No:
ipConfiguration
No:
ipConfigurations
No reference to the NIC exists in the ARM representation.
NIC object does NOT show any Public IP attachment
az rest </span>
--method get </span>
--url "https://management.azure.com/subscriptions/b3f71006-5692-4090-8841-dd91c5ba03b2/resourceGroups/Externo/providers/Microsoft.Network/networkInterfaces/sec4us-site270?api-version=2023-09-01"
Important section:
{
"properties": {
"provisioningState": "Failed",
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAddress": "10.1.1.12",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": ".../subnets/default"
}
}
}
]
}
}
No:
publicIPAddress
No:
publicIPAddresses
No visible association with the Public IP object.
Resource Graph shows the same result
Resource Graph returns the NIC in Failed state and also does not show a Public IP association.
{
"name": "sec4us-site270",
"provisioningState": "Failed"
}
NIC update operations fail
PowerShell:
$nic = Get-AzNetworkInterface </span></div><div class="scriptor-paragraph"><span attribution="{"name":"Copilot","oid":"E64C3D4F-5E12-4514-AD9B-893A6FAFD00C","id":"E64C3D4F-5E12-4514-AD9B-893A6FAFD00C","userInfo":{"name":"Copilot","oid":"E64C3D4F-5E12-4514-AD9B-893A6FAFD00C","id":"E64C3D4F-5E12-4514-AD9B-893A6FAFD00C"},"timestamp":1783086900000,"dataSource":0}"> -ResourceGroupName "Externo"
-Name "sec4us-site270"
Set-AzNetworkInterface -NetworkInterface $nic
Result:
Status: Failed
ErrorCode: InternalServerError
ErrorMessage: An error occurred.
`
Direct ARM PUT succeeds but eventually returns to Failed
I rebuilt the NIC definition using ARM REST PUT:
az rest </span>
--method put </span>
--url ".../networkInterfaces/sec4us-site270?api-version=2023-09-01" </span>
--body @nic-clean.json
ARM accepted the request:
200 OK
NIC state changed from:
Failed
to:
Updating
The ETag changed, confirming the RP processed the resource.
After approximately 20 seconds:
Updating
returned to:
Failed
Direct NIC DELETE is accepted but never completes
Direct ARM delete:
az rest </span>
--method delete </span>
--url ".../networkInterfaces/sec4us-site270?api-version=2023-09-01"
Response:
202 Accepted
NIC state changed to:
Deleting
The resource stayed in:
Deleting
for some time.
Then returned to:
Failed
`
with a new ETag.
This indicates the Resource Provider actually attempted the delete operation but failed internally during execution.
Subnet still references the NIC/IP Configuration
Current subnet state:
az network vnet subnet show </span>
-g Externo </span>
--vnet-name Externo-vnet </span>
-n default
`
Result:
{
"provisioningState": "Succeeded",
"ipConfigurations": [
{
"id": "/subscriptions/.../networkInterfaces/sec4us-site270/ipConfigurations/ipconfig1"
}
]
}
So the subnet still maintains a reference to:
sec4us-site270/ipConfigurations/ipconfig1
Attempts to reconcile the subnet
Executed:
az network vnet subnet update </span>
--ids <SUBNET_ID> </span>
--remove ipConfigurations
Azure accepted and reprocessed the subnet.
Async operation completed:
{
"status": "Succeeded"
}
After reconciliation, the subnet still contained:
"ipConfigurations": [
{
"id": ".../sec4us-site270/ipConfigurations/ipconfig1"
}
]
The reference was automatically rebuilt.
Additional observations
- Activity Log does not show meaningful failure details for the NIC.
- Public IP remains undeletable.
- NIC remains in Failed state.
- PUT and DELETE operations are accepted by Microsoft.Network but eventually fail.
- Public IP claims dependency on NIC.
- ARM representation of the Public IP does not show any association.
- ARM representation of the NIC does not show any Public IP association.
My conclusion
This looks like an orphaned/stale dependency inside Microsoft.Network.
The dependency graph appears inconsistent:
Public IP -> NIC relationship exists internally
while:
Public IP ARM representation shows no NIC
NIC ARM representation shows no Public IP
Could a Microsoft engineer verify whether there is a stale backend reference involving:
NIC:
sec4us-site270
IP Configuration:
ipconfig1
Public IP:
sec4us-site-ip
and perform backend cleanup if necessary?
Any guidance or confirmation would be greatly appreciated.
Thank you.Abaixo está um texto que eu abriria no Microsoft Q&A. Ele está estruturado para facilitar a análise pelos moderadores/engenheiros da Microsoft e já contém as evidências técnicas que coletamos.
Azure NIC stuck in Failed state / Public IP dependency orphaned / Resource Group cannot be deleted
Environment
Subscription ID
b3f71006-5692-4090-8841-dd91c5ba03b2
``
Resource Group
Externo
Region
South Central US
Resources involved
NIC:
sec4us-site270
Public IP:
sec4us-site-ip
VNet:
Externo-vnet
Subnet:
default
Problem description
I am trying to delete a Resource Group that contains an old network stack.
The deletion is blocked because Azure reports that the Public IP is still attached to a Network Interface.
However:
- The Network Interface no longer shows any Public IP association.
- The Public IP no longer shows any NIC association.
- The NIC remains permanently in
Failed state.
- Any update operation on the NIC eventually goes to
Failed.
- Any delete operation on the NIC enters
Deleting, then returns to Failed.
- The Public IP cannot be deleted because Azure still believes it is attached to the NIC.
This appears to be a stale dependency/orphaned reference inside the Microsoft.Network Resource Provider.
Evidence
Public IP cannot be deleted
Direct DELETE against ARM:
az rest </span>
--method delete </span>
--url "https://management.azure.com/subscriptions/b3f71006-5692-4090-8841-dd91c5ba03b2/resourceGroups/Externo/providers/Microsoft.Network/publicIPAddresses/sec4us-site-ip?api-version=2023-09-01"
Result:
{
"error": {
"code": "PublicIPAddressCannotBeDeleted",
"message": "Public IP address ... can not be deleted since it is still allocated to resource .../networkInterfaces/sec4us-site270 ..."
}
}
Public IP object does NOT show any NIC attachment
az rest </span>
--method get </span>
--url "https://management.azure.com/subscriptions/b3f71006-5692-4090-8841-dd91c5ba03b2/resourceGroups/Externo/providers/Microsoft.Network/publicIPAddresses/sec4us-site-ip?api-version=2023-09-01"
Response:
{
"properties": {
"provisioningState": "Succeeded",
"ipAddress": "40.84.222.149",
"publicIPAllocationMethod": "Static"
}
}
No:
ipConfiguration
No:
ipConfigurations
No reference to the NIC exists in the ARM representation.
NIC object does NOT show any Public IP attachment
az rest </span>
--method get </span>
--url "https://management.azure.com/subscriptions/b3f71006-5692-4090-8841-dd91c5ba03b2/resourceGroups/Externo/providers/Microsoft.Network/networkInterfaces/sec4us-site270?api-version=2023-09-01"
Important section:
{
"properties": {
"provisioningState": "Failed",
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAddress": "10.1.1.12",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": ".../subnets/default"
}
}
}
]
}
}
No:
publicIPAddress
No:
publicIPAddresses
No visible association with the Public IP object.
Resource Graph shows the same result
Resource Graph returns the NIC in Failed state and also does not show a Public IP association.
{
"name": "sec4us-site270",
"provisioningState": "Failed"
}
NIC update operations fail
PowerShell:
$nic = Get-AzNetworkInterface </span></div><div class="scriptor-paragraph"><span attribution="{"name":"Copilot","oid":"E64C3D4F-5E12-4514-AD9B-893A6FAFD00C","id":"E64C3D4F-5E12-4514-AD9B-893A6FAFD00C","userInfo":{"name":"Copilot","oid":"E64C3D4F-5E12-4514-AD9B-893A6FAFD00C","id":"E64C3D4F-5E12-4514-AD9B-893A6FAFD00C"},"timestamp":1783086900000,"dataSource":0}"> -ResourceGroupName "Externo"
-Name "sec4us-site270"
Set-AzNetworkInterface -NetworkInterface $nic
Result:
Status: Failed
ErrorCode: InternalServerError
ErrorMessage: An error occurred.
`
Direct ARM PUT succeeds but eventually returns to Failed
I rebuilt the NIC definition using ARM REST PUT:
az rest </span>
--method put </span>
--url ".../networkInterfaces/sec4us-site270?api-version=2023-09-01" </span>
--body @nic-clean.json
ARM accepted the request:
200 OK
NIC state changed from:
Failed
to:
Updating
The ETag changed, confirming the RP processed the resource.
After approximately 20 seconds:
Updating
returned to:
Failed
Direct NIC DELETE is accepted but never completes
Direct ARM delete:
az rest </span>
--method delete </span>
--url ".../networkInterfaces/sec4us-site270?api-version=2023-09-01"
Response:
202 Accepted
NIC state changed to:
Deleting
The resource stayed in:
Deleting
for some time.
Then returned to:
Failed
`
with a new ETag.
This indicates the Resource Provider actually attempted the delete operation but failed internally during execution.
Subnet still references the NIC/IP Configuration
Current subnet state:
az network vnet subnet show </span>
-g Externo </span>
--vnet-name Externo-vnet </span>
-n default
`
Result:
{
"provisioningState": "Succeeded",
"ipConfigurations": [
{
"id": "/subscriptions/.../networkInterfaces/sec4us-site270/ipConfigurations/ipconfig1"
}
]
}
So the subnet still maintains a reference to:
sec4us-site270/ipConfigurations/ipconfig1
Attempts to reconcile the subnet
Executed:
az network vnet subnet update </span>
--ids <SUBNET_ID> </span>
--remove ipConfigurations
Azure accepted and reprocessed the subnet.
Async operation completed:
{
"status": "Succeeded"
}
After reconciliation, the subnet still contained:
"ipConfigurations": [
{
"id": ".../sec4us-site270/ipConfigurations/ipconfig1"
}
]
The reference was automatically rebuilt.
Additional observations
- Activity Log does not show meaningful failure details for the NIC.
- Public IP remains undeletable.
- NIC remains in Failed state.
- PUT and DELETE operations are accepted by Microsoft.Network but eventually fail.
- Public IP claims dependency on NIC.
- ARM representation of the Public IP does not show any association.
- ARM representation of the NIC does not show any Public IP association.
My conclusion
This looks like an orphaned/stale dependency inside Microsoft.Network.
The dependency graph appears inconsistent:
Public IP -> NIC relationship exists internally
while:
Public IP ARM representation shows no NIC
NIC ARM representation shows no Public IP
Could a Microsoft engineer verify whether there is a stale backend reference involving:
NIC:
sec4us-site270
IP Configuration:
ipconfig1
Public IP:
sec4us-site-ip
and perform backend cleanup if necessary?
Any guidance or confirmation would be greatly appreciated.
Thank you.