Delete an Azure role-based access control (RBAC) role assignment by scope and name. The scope
defaults to the active subscription and can be narrowed with -ResourceGroupName or overridden with
-Scope (the two are mutually exclusive). -Name (the assignment's GUID) is required: this targets
exactly one already-known assignment. Deleting by principal/role filter, or deleting every assignment
at a scope, is not supported — use Get-AzRoleAssignment first to find the assignment's name.
Examples
Delete a role assignment by name at a resource group scope
Fully qualified scope to delete the role assignment from (the delete target). Mutually exclusive with -ResourceGroupName. Defaults to the subscription scope.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The deleted RoleAssignment, including its id, name, and properties (role definition id, principal id and type, and scope). ARM returns no content when the assignment did not exist, so nothing is written to the pipeline in that case.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.