Cannot delete Service Bus Namespace

Mark Pith 20 Reputation points
2025-04-23T19:02:37.81+00:00

I am attempting to delete a Premium Service Bus namespace. The service bus is not being used, nor has it been used. It fails due to an ongoing migration, of which we are not aware of any. Georeplication is not enabled, nor has it been in the past.

mark [ ~ ]$ az servicebus namespace delete --namespace-name nxxx-xxx --resource-group Nxxxx-dev-servicebus-rg (MigrationConfigCannotDeleteConflict) Migration config cannot be deleted because replication is in progress. Please complete or abort migration before attempting to delete the config. Code: MigrationConfigCannotDeleteConflict Message: Migration config cannot be deleted because replication is in progress. Please complete or abort migration before attempting to delete the config.

mark [ ~ ]$ az servicebus migration show --namespace-name nxxx-xxx --resource-group Nxxxx-dev-servicebus-rg (MigrationConfigNotFound) Migration config does not exist for namespace 'nxxx-xxx'. Code: MigrationConfigNotFound Message: Migration config does not exist for namespace 'nxxx-xxx'.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
697 questions
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 17,766 Reputation points Moderator
    2025-05-19T23:18:31.6+00:00

    @Mark Pith Thank you for providing an offline confirmation. Sharing the resolution on this forum to help broader community.

    Thanks for your patience on this. Our internal team has reviewed the backend logs and they see a geo-recdovery pairing operation active on the service bus namespace. In order to delete the service bus, it is advised to abort the pairing on the namespace

    You can use the following CLI cmdlet to break the pairing

    Copy

    az servicebus georecovery-alias break-pair [--alias] [--ids] [--namespace-name] [--resource-group] [--subscription]
    

    Once the pairing is broken down, the service bus namespace can be deleted.


    Please do click Accept Answer and Yes for this answer if it was helpful, as it might be beneficial to other community members reading this thread. If you have any further query, do let us know. Thank you

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.