The DenyAssignmentAuthorizationFailed error occurs when there is a deny assignment blocking your access to perform the deletion:
https://zcusa.951200.xyz/en-us/azure/role-based-access-control/deny-assignments?tabs=azure-portal
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am encountering a 'DenyAssignmentAuthorizationFailed' error when trying to delete the resource group. The error message indicates that there is a deny assignment preventing the deletion.
The DenyAssignmentAuthorizationFailed error occurs when there is a deny assignment blocking your access to perform the deletion:
https://zcusa.951200.xyz/en-us/azure/role-based-access-control/deny-assignments?tabs=azure-portal
Hi Anup Thomas,
Welcome to Microsoft Q&A Forum, thank you for posting your query here!
Deny Assignment that is preventing the deletion of your resource group. This is a common issue when certain policies or assignments are in place to restrict actions on resources
I suggest few steps you can take to troubleshoot the issue.
Identify the Deny Assignment: Check the resource group or the specific resource to identify the deny assignment. You can do this through the Azure portal or by using Azure CLI/PowerShell.
Check for Managed Applications: If the deny assignment was created by a managed application, you might need to delete the managed application first
Remove-AzRoleAssignment -ObjectId <ObjectId> -Scope <Scope> -RoleDefinitionName <RoleName>
Deployment Stacks: If the deny assignment was applied by a deployment stack, you might need to manage it through the deployment stack settings
Reference: https://zcusa.951200.xyz/en-us/answers/questions/586310/deny-assignemnt.html
https://zcusa.951200.xyz/en-us/answers/questions/1460841/how-to-delete-a-rg-that-has-a-deny-assignment-cant
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.
If you have any other questions or are still running into more issues, let me know in the "comments" and I would be happy to help you