2

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

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

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

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

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

4

1 回答 1

0

你可以使用 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
于 2018-10-15T04:33:25.017 回答