简体   繁体   English

使用“未找到身份”查找角色分配的可靠方法是什么? 在 Azure 和 Powershell 上?

[英]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.

相关问题 托管身份 Azure 角色分配? - Managed Identity Azure Role Assignments? 使用 terraform 将角色分配添加到托管标识的多个 Azure 订阅 - Adding role assignments to multiple Azure subscriptions for a managed identity using terraform 删除 Azure 中的孤立角色分配 - Delete Orphaned Role assignments in Azure AuthorizationFailed - 在 Azure 中创建角色分配 - AuthorizationFailed - Creating Role Assignments in Azure 无法使用 Graph API 删除应用角色分配。 获取“未找到正在更新或删除的 EntitlementGrant。” 错误 - Unable to remove app role assignments using Graph API. Getting "EntitlementGrant being updated or deleted is not found." error 未找到请求值'VS2015'。 - Azure powershell - Requested value 'VS2015' was not found. - Azure powershell Azure 添加应用程序角色分配与 Python - Azure add application role assignments with Python Microsoft Azure 中的角色分配和 appRoleAssignments 之间的区别 - Difference between Role Assignments and appRoleAssignments in Microsoft Azure 获取到 AAD 组的 Azure 角色分配 - Fetch Azure role assignments to AAD groups 获取 Azure AD 主体的所有角色分配 - Get all role assignments of an Azure AD Principal
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM