[英]What is the sure-fire way to find role assignments with "Identity not found." on Azure with Powershell?
If you assign a role in Azure and later delete the identity before you delete the role assignment, you wind up with an "Identity not found."如果您在 Azure 中分配了一个角色,然后在删除角色分配之前删除了该身份,您将以“找不到身份”结束。 condition.
健康)状况。 It's harmless, but it takes up a role assignment slot and clutters the role assignments list.
它是无害的,但它会占用角色分配槽并使角色分配列表混乱。 I would like to find and delete these.
我想找到并删除这些。
I am thinking that this:我在想这个:
Get-AzRoleAssignment | Where-object -Property Displayname -eq $null
...will get me those roles without an associated identity, and it seems to work, but the Azure docs don't really create much of an assurance that this will cover all cases. ...将使我获得那些没有关联身份的角色,而且它似乎有效,但 Azure 文档并不能真正保证这将涵盖所有情况。
Should I add something else to this?我应该为此添加其他内容吗? Or is there a better way of finding these roles assignments?
或者是否有更好的方法来查找这些角色分配?
Turns out this is the way to identify these orphaned role assignments, albeit indirectly.事实证明,这是识别这些孤立角色分配的方法,尽管是间接的。 However, you will not be able to remove these orphaned role assignments unless you have the permission to get to all of them.
但是,您将无法删除这些孤立的角色分配,除非您有权访问所有这些角色分配。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.