Share via

Unable to delete Events Hub Cluster with name "TestEventHub" due to it has dependency on Cluster Namespaces "test-functionApp" but "test-functionApp" is not found itself.

Srinivasa Rao Vadlamudi 0 Reputation points
2026-04-14T18:56:39.1433333+00:00

Please use below information and help me to resolve the issue as its costing a lot.

SUBSCRIPTION=""

RESOURCE_GROUP="dotnetsample"

CLUSTER="TestEventHub"

NAMESPACE="test-functionApp"

Tracking ID (65c50e0f-8f0f-41a6-bed5-871f859afefe)

Thanks & Regards,

Srinivasa Vadlamudi

Azure Event Hubs
0 comments No comments

2 answers

Sort by: Most helpful
  1. Manoj Kumar Boyini 13,685 Reputation points Microsoft External Staff Moderator
    2026-04-15T00:29:19.6866667+00:00

    Hi @Srinivasa Rao Vadlamudi

    It looks like your Event Hubs dedicated cluster TestEventHub won’t delete because Azure still thinks there’s a namespace called test-functionApp inside it—even though you can’t see that namespace anywhere. To clear that up and get your cluster deleted, here’s what you can try:

    Verify the “ghost” namespace exists • Run CLI to list all namespaces attached to your cluster: az eventhubs cluster namespace list --resource-group dotnetsample --cluster-name TestEventHub • Do you see test-functionApp in that output?

    If you do see it, delete it explicitly • Either via CLI: az eventhubs namespace delete --resource-group dotnetsample --name test-functionApp • Or via PowerShell: Remove-AzEventHubNamespace -ResourceGroupName dotnetsample -Name test-functionApp

    If it’s not listed there but Azure still throws the dependency error, try deleting via ARM: • First grab the full resource ID (replace with your subscription): /subscriptions//resourceGroups/dotnetsample/providers/Microsoft.EventHub/clusters/TestEventHub/namespaces/test-functionApp • Then run: az resource delete --ids /subscriptions/.../test-functionApp

    Double-check locks on your resources • Resource locks will block deletes even if the resource shows up. List them with: az lock list --resource-group dotnetsample • Remove any CanNotDelete or ReadOnly locks on the cluster or namespace before retrying.

    Once the dependent namespace is gone, delete your cluster: • CLI: az eventhubs cluster delete --resource-group dotnetsample --name TestEventHub --yes • PowerShell: Remove-AzEventHubCluster -ResourceGroupName dotnetsample -Name TestEventHub

    If you still hit that same dependency error after walking through those steps, it’s likely an orphaned child resource in the control plane. At that point you’ll want to open a support ticket so the backend service team can clear the dangling dependency.

    Hope that helps get your cluster deleted and stop the billing wheel. Let me know how it goes!

    Reference list • Deleting an Event Hubs Namespace / Event Hub (REST API) https://docs.microsoft.com/rest/api/eventhub/delete-event-hub
    • Remove-AzEventHubCluster (PowerShell)
    https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubcluster?view=azps-15.5.0
    • az eventhubs cluster delete (Azure CLI)
    https://learn.microsoft.com/cli/azure/eventhubs/cluster?view=azure-cli-latest
    • Lock resources to prevent unexpected deletes/changes
    https://docs.microsoft.com/azure/azure-resource-manager/management/lock-resources?tabs=json#managed-applications-and-locks

    1 person found this answer helpful.
    0 comments No comments

  2. Srinivasa Rao Vadlamudi 0 Reputation points
    2026-04-15T02:20:34.4933333+00:00

    Thanks Manoj Kumar for your valuable inputs and I tried as recommended steps but its not getting deleted at all. Can you please provide help on opening a support ticket to manually remove the orphaned namespace reference from the Event Hubs Dedicated cluster metadata.


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.