Skip to content

az role assignment delete fails if the assignee principal no longer exists #20349

@jiasli

Description

@jiasli

Describe the bug

Customer is Trying to remove RBAC role assignments for users/groups/service principals that no longer exist using azure cli and he is receiving the below error message (this was working in the past but stopped working a week ago):

Command used:

az role assignment delete --role 'Monitoring Reader' --Assignee xxx --Scope xxx

Error message they are getting:

ERROR: Cannot find user or service principal in graph database for xxx'. If the assignee is an appId, make sure the corresponding service principal is created with 'az ad sp create --id xxx'`

Metadata

Metadata

Assignees

Labels

Graph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adMicrosoft GraphRBACaz rolefeature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions