Share via

Unable to delete Azure Public IP due to a stale/orphaned ipConfiguration reference to a non-existent Network Interface (NIC). This is blocking deletion of dependent resources and the entire resource group.

Sharath Silmaram 5 Reputation points
2026-04-14T09:37:45.48+00:00

Detailed Description

I am facing an issue in Azure where a Public IP address cannot be deleted because it is still associated with a Network Interface (NIC), but that NIC is not accessible or visible via Azure Portal or CLI.

❗ Error Message

PublicIPAddressCannotBeDeleted:
Public IP address ... cannot be deleted since it is still allocated to resource
...

🔹 Observations

The referenced NIC () is:

❌ Not visible in Azure Portal (initially)

  ❌ Not retrievable using CLI (`az network nic show`)

  
  However:

  
     It **appears under VNet → Connected devices**

     
        It is still holding a private IP 

        
        Because of this:

        
           Public IP cannot be deleted

           
              NSG cannot be deleted

              
                 Subnet cannot be deleted

                 
                    Entire Resource Group deletion fails
```---
## 🔹 Troubleshooting Steps Already Tried

**Detach Public IP via CLI**

```sql
az network nic ip-config update --remove publicIpAddress

→ Failed with ResourceNotFound

Update Public IP using az rest (PUT)

Attempted to remove ipConfiguration → Azure automatically restores the reference

Azure Resource Explorer

  Removed `ipConfiguration` manually → After PUT, it reappears again

  
  **Delete NIC via CLI**

  
  ```sql
  az resource delete --ids <NIC_ID>

→ Failed / NIC not found

Checked Resource Group deletion → Fails due to:

 Public IP dependency

 
    Subnet in use

    
       NSG in use
## 🔹 Root Cause (Suspected)

This appears to be an **Azure backend inconsistency** where:

A NIC is either partially deleted or stuck

Public IP still holds a **stale/ghost reference**

Azure enforces dependency validation, preventing deletion

---
## 🔹 Impact

Unable to clean up resources

Resource Group deletion is blocked

Costs may continue due to undeleted resources

---
## 🔹 Request

Has anyone encountered a similar issue with:

Stale `ipConfiguration` references

Ghost NIC dependencies

What is the recommended way to:

Force remove the stale association?

Successfully delete the Public IP and dependent resources?

Is Azure Support intervention required in such cases?

---
Any help or guidance would be greatly appreciated 🙏

## 

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.


1 answer

Sort by: Most helpful
  1. Alex Burlachenko 20,665 Reputation points MVP Volunteer Moderator
    2026-04-14T14:10:55.09+00:00

    Sharath Silmaram hi )

    ghost NIC / stale reference issue, u already did the right steps, now only force paths left, try deleting Public IP via latest REST API

    az rest --method delete
    --uri "https://management.azure.com/<PUBLIC_IP_ID>?api-version=2023-09-01"

    confirm if NIC really exists (Resource Graph)

    az graph query -q "Resources | where name == '360tap-newtest-shara821'"

    if nothing returned its a backend ghost, try clearing dependency from subnet

    az network vnet subnet update
    --ids <SUBNET_ID>
    --remove ipConfigurations

    try move resource workaround

    az resource move --destination-group <newRG> --ids <PUBLIC_IP_ID>

    then delete in new RG, optional trick recreate NIC with same name sometimes breaks stale binding

    final reality if NIC not visible in ARM/CLI u cant fix it client-side or at the endopen msft ticket and request backend cleanup of stale ipConfiguration reference, usually they handle these cases pretty routinely.

    rgds,

    Alex

    1 person found this answer 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.