Unable to Remove Azure Databricks Managed Resource Group

SayliPW 5 Reputation points

When I try deleting RG created by Az databricks, it fails with given error.

Failed to delete resource group databricks-rg-ad-xx-xxxxx: The client 'live.com#xxx@gmail.com' with object id 'fd1e8387-xxxxx-d0b2524d7502' has permission to perform action 'Microsoft.Resources/subscriptions/resourceGroups/delete' on scope '/subscriptions/xxxx/resourceGroups/databricks-rg-ad-xxx-xxx'; however, the access is denied because of the deny assignment with name 'System deny assignment created by Azure Databricks /subscriptions/77abc3ea-xxxxx.

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,066 questions
{count} vote

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 85,031 Reputation points Microsoft Employee

    @SayliPW - Thanks for the question and using MS Q&A platform.

    Before going to delete the managed resource group let's understand some concepts associated with Azure Databricks Workspace.

    What is Managed Resource Group?

    This resource group holds all the resources that are required by the managed application. For example, this resource group contains the virtual machines, storage accounts, and virtual networks for the solution. The customer has limited access to this resource group because the customer doesn't manage the individual resources for the managed application.

    Is it possible to delete the Managed Resource Group?

    When we create a Azure Databricks workspace, by design it will automatically create Databricks Managed resource Group. The managed resource group must exist as this is where your cluster(s) will be created. To ensure that nothing breaks them, they are placed in a separate resource group (managed resource group) that has a super lock on it so you cannot modify anything in it.

    What happens if you try to delete the Managed Resource Group?

    If you are trying to delete the Managed Resource Group - you will experience the error message as shown below, because by default every managed resource group has a DenyAssignment on the resource group which prevents manually deletion by any user.

    User's image

    As per the repro, I tried to delete the managed resource group named (databricks-rg-cheprademo-dabcjoqzbfpi2) as experienced the below error message:


    How to delete the managed resource group associated with Azure Databricks Workspace?

    In order to delete this managed resource group, First you need to delete Azure Databricks workspace that is associated with it. Then as part of the process even the Azure Databricks Managed resource Group gets deleted.

    You may follow the below steps to delete the managed resource group associated with Azure Databricks.

    Step1: Identify the associated Azure Databricks workspace with managed resource group.

    Note: To identify the associated Azure Databricks workspace => Open managed resource group and you will find the associated Azure Databricks workspaces shown as Managed By : DatabricksworkspaceName
    User's image

    Step2: Click on the Managed By : DatabricksworkspaceNameand then delete the Azure Databricks workspace.
    Note: By deleting associated Azure Databricks workspace automatically deletes the managed resource group.


    We had successfully deleted the managed resource group by following the above steps.

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.