如何使用 Get-MgGroupOwner 获取 Microsoft Entra ID 组所有者

检索 Microsoft Entra ID 组所有者

管理 Microsoft Entra ID 中的组所有权对于委派管理控制和确保组织内的责任制至关重要。IT 管理员经常需要检索 Microsoft Entra ID 组所有者列表,以验证权限、更新职责或执行各种治理策略。虽然 Microsoft Graph PowerShell 命令如 Get-MgGroupOwner 可以帮助管理员获取组所有者详细信息,但这需要脚本知识且可能耗时。

这就是 ManageEngine ADManager Plus 的用武之地。这个 Active Directory 管理报告 工具提供预配置的报告,易于生成和导出。管理员可以轻松识别、更新和管理 Microsoft Entra ID 中的组所有者,无需复杂的 PowerShell 脚本。

  • ADManager Plus
  • PowerShell
 

使用 ADManager Plus 获取 Microsoft Entra ID 组所有者

  1. 登录 ADManager Plus 并导航至 Microsoft 365 > Reports > Group Reports
  2. General Group Reports 中选择 Groups with Owner
  3. 从下拉列表中选择 Microsoft 365 Tenant
  4. 点击 Generate Now
使用 Graph PowerShell 获取 Microsoft Entra ID 组所有者
 
 

查看组的所有者。

 
 

使用筛选器自定义报告,并将筛选后的报告另存为新报告。

 
 

导出报告并通过电子邮件发送。

使用 Microsoft Graph PowerShell 获取 Microsoft Entra ID 组所有者

前提条件

在运行 Get-MgGroupOwner cmdlet 之前,请确保满足以下要求:

  • The Microsoft Graph PowerShell module is installed. If it’s not installed, use the following command:
    Install-Module Microsoft.Graph -Scope CurrentUser
  • Connect to Microsoft Graph PowerShell with the required permissions to retrieve Microsoft Entra ID group members:
    Connect-MgGraph -Scopes "GroupMember.Read.All", "Group.Read.All"

使用 Get-MgGroupOwner cmdlet 获取 Microsoft Entra ID 组所有者

在 Microsoft Graph PowerShell 中使用 Get-MgGroupOwner cmdlet 检索 Microsoft Entra ID 组所有者列表。语法如下:

Get-MgGroupOwner
-GroupId <String>
[-ExpandProperty <String[]>]
[-Filter <String>]
[-Property <String[]>]
[-Search <String>]
[-Skip <Int32>]
[-Sort <String[]>]
[-Top <Int32>]
[-ConsistencyLevel <String>]
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-PageSize <Int32>]
[-All]
[-CountVariable <String>]
[-ProgressAction <ActionPreference>]
[<CommonParameters>]

使用 Get-MgGroupOwner cmdlet 的示例用例和脚本

示例:获取组的所有者

Get-MgGroupOwner -GroupId "your-group-id"

支持的参数

下表列出了可与 Get-MgGroupOwner cmdlet 一起使用的关键参数,以高效获取 Microsoft Entra ID 组所有者列表。

参数 描述
-All 此列表显示所有页面。
-ConsistencyLevel 这表示请求的一致性级别。
-CountVariable 指定集合中项目的总数。默认情况下,此变量将在全局作用域中设置。
-Filter 按属性值过滤项目。
-GroupID 这是组的唯一标识符。

注意:Microsoft 已宣布弃用 Azure AD PowerShell 并过渡到 Microsoft Graph PowerShell。

使用 Graph PowerShell 脚本检索 Microsoft Entra ID 组所有者的挑战

  • 从 Azure AD PowerShell 过渡到 Microsoft Graph PowerShell 的 IT 管理员需要精通 PowerShell 脚本技能。
  • 缺乏用户友好的界面使得 PowerShell 经验有限的用户面临挑战。
  • 内置错误处理有限,使故障排除更加困难,通常需要手动调试。
  • Microsoft Graph API 的限流限制可能会降低性能,尤其是在处理大型数据集时。

使用 ADManager Plus 获取 Microsoft Entra ID 组所有者的亮点

  • ADManager Plus 提供超过 200 个 全面报告,为管理员提供详细洞察。
  • 这些报告可以根据您的需求进一步筛选和自定义。
  • 将生成的报告导出为 HTML、CSV、XLS 和 PDF 等格式,甚至直接通过电子邮件发送给相关人员。
  • 安排自动报告生成,减少工作量并节省时间。
  • 轻松执行 批量管理操作,无需任何复杂脚本。

使用 ADManager Plus 无缝获取和管理 Microsoft Entra ID 组详细信息

 
  • 检索 Microsoft Entra ID 组所有者
  • 使用 ADManager Plus 获取 Microsoft Entra ID 组所有者
  • 使用 Microsoft Graph PowerShell 获取 Microsoft Entra ID 组所有者
  • 使用 Graph PowerShell 脚本检索 Microsoft Entra ID 组所有者的挑战
  • 使用 ADManager Plus 获取 Microsoft Entra ID 组所有者的亮点
Active Directory管理与报告的一站式解决方案
电子邮件下载链接 Email the ADManager Plus download link