Azure 所有者角色和共同管理员之间的区别



我们的订阅有 5 个资源组。 根据Microsoft文档,在订阅级别设置时,较旧的"共同管理员"角色等效于较新的"所有者"RBAC 角色。

https://learn.microsoft.com/en-us/azure/role-based-access-control/rbac-and-directory-admin-roles

服务管理员和共同管理员具有 已分配有所有者角色的用户的等效访问权限 ( Azure RBAC 角色(在订阅范围内。

我没有看到这种行为。 当我的帐户角色在订阅级别设置为所有者时,我看不到任何资源组。 将同一帐户设置为共同管理员时,我可以看到所有 5 个资源组。

如何使用较新的 RBAC 角色允许所有者查看订阅中的所有资源组?

可以使用 Azure AD PowerShell 创建用户,他们向用户授予"所有者"角色。有关更多详细信息,请参阅文档。

#create user
Connect-AzureAD
$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile
$PasswordProfile.Password = "Wdsr199545!"
New-AzureADUser -DisplayName "test User" -PasswordProfile $PasswordProfile -UserPrincipalName "test@hanxia.onmicrosoft.com" -AccountEnabled $true -MailNickName "testuser"
#grant access 
Login-AzureRmAccount
$sub = Get-AzureRmSubscription
$scope = "/subscriptions/" + $sub.Id
New-AzureRmRoleAssignment -SignInName test@hanxia.onmicrosoft.com -Scope $scope -RoleDefinitionName Owner

最新更新