Here’s today’s scenario: You are managing your role-based access control (RBAC) roles in the Azure Portal and start getting the following error message: “Role assignments created at root scope must be removed by using the command line.” Now what?
The solution can be easily accomplished by using Cloud Shell. Use PowerShell mode, and we will use the Remove-AZRoleAssignment cmdlet. The syntax of the cmdlet is listed below. Just replace the username and the role definition name to match your requirement.
Remove-AZRoleAssignment -SignInName <[email protected]> -RoleDefinitionName "User Access Administrator" -Scope "/"
Nice and easy!
More Quick Tips articles
- New from Microsoft: Azure Security Center onboarding guide
- Fixing Azure Key Vault when moving to a different tenant
- Restore Azure Key Vault using just two PowerShell cmdlets
- This overlooked feature in Visual Studio Code can speed release time
- Enabling Front Door managed certificates in Azure: Status update