Azure active directory 无法将组作为所有者添加到Azure AD中的另一个组

Azure active directory 无法将组作为所有者添加到Azure AD中的另一个组,azure-active-directory,Azure Active Directory,我们想将管理员组作为所有者添加到所有其他组中。当我们试图通过powershell命令添加时,出现以下错误 目前不支持将组作为所有者添加到所有其他组中 您可以使用获取组成员的列表,然后使用foreach将所有成员添加为其他组的所有者 例如: $adgms = Get-AzureADGroupMember -ObjectId "{objectId of the admin group}" -All $true foreach($adgm in $adgms){ Add-AzureADGrou

我们想将管理员组作为所有者添加到所有其他组中。当我们试图通过powershell命令添加时,出现以下错误


目前不支持将组作为所有者添加到所有其他组中

您可以使用获取组成员的列表,然后使用foreach将所有成员添加为其他组的所有者

例如:

$adgms = Get-AzureADGroupMember -ObjectId "{objectId of the admin group}" -All $true
foreach($adgm in $adgms){
    Add-AzureADGroupOwner -ObjectId "{objectId of the target group}" -RefObjectId $adgm.ObjectId
}

到目前为止,如果您提供更多的上下文和示例,stackoverflow的用户可能会帮助您。如果我的答案对您有帮助,您可以将其作为答案接受(单击答案旁边的复选标记,将其从灰显改为填充)。这可能对其他社区成员有益。非常感谢。