Unable to delete resource group due to deny assignment

Dave Clements 0 Reputation points

I was playing around with using Containers for Azure functions and when I try and clean up, i've been left with resource groups that Azure created for me (this was all done via point & click in the portal - not Bicep or a Blueprint)

When I try and delete them, I get a message that my account has permission, but there is a Deny Assignment on the resource group - All principals are denied, which is an Azure assignment that it won't let me remove (says deny assignments are read-only)

Other tickets mention deleting the app that created the RG to remove the assignment, but the only Enterprise Application I can find that would be relevant tells me that I can't delete it as it is a "Microsoft first party application"

How do I go about deleting these resource groups?

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
338 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Luca Lionetti 3,136 Reputation points


    Welcome to Microsoft Q&A community forum!

    try using this command in cloudshell

    Get-AzResourceGroup -Name "YOUR-RG-NAME" | Remove-AzResourceGroup -Force

    Hope this helps



    Please "Accept as Answer" and Upvote if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues

    0 comments No comments

  2. Mike Urnun 9,786 Reputation points Microsoft Employee

    Hello @Dave Clements - Thanks for reaching out, and posting on the MS Q&A.

    Could you clarify what the resource groups created by Azure are named? Be sure to omit any private details. Were you deploying ACA to a VNET? If the RGs are preceded with "MC_" you shouldn't have to worry about cleaning them. The Containers Apps team is working on making them invisible. If they don't go away after some time, please consider opening a new issue here for the ACA team to review.

    Feel free to take a look and track the following open issue: https://github.com/microsoft/azure-container-apps/issues/207

    Please "Accept Answer" if the answer is helpful so that others in the community may benefit from your experience.

    0 comments No comments