Get-EntraGroupOwner

Gets an owner of a group.

Syntax

Get-EntraGroupOwner
   -GroupId <String>
   [-All]
   [-Top <Int32>]
   [-Property <String[]>]
   [<CommonParameters>]

Description

The Get-EntraGroupOwner cmdlet gets an owner of a group in Microsoft Entra ID. Specify GroupId parameter gets an owner of a group.

In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with the microsoft.directory/groups/owners/read permission. The following least privileged roles support this operation:

  • Group owners
  • Directory Readers
  • Directory Writers
  • Groups Administrator
  • User Administrator

Examples

Example 1: Get a group owner by ID

Connect-Entra -Scopes 'GroupMember.Read.All'
Get-EntraGroupOwner -GroupId 'vvvvvvvv-7777-9999-7777-jjjjjjjjjjjj'

Id                                   DeletedDateTime
--                                   ---------------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
bbbbbbbb-1111-2222-3333-cccccccccccc
cccccccc-2222-3333-4444-dddddddddddd
dddddddd-3333-4444-5555-eeeeeeeeeeee

This example demonstrates how to retrieve the owner of a specific group.

  • -GroupId Parameter specifies the ID of a group.

Example 2: Gets all group owners

Connect-Entra -Scopes 'GroupMember.Read.All'
Get-EntraGroupOwner -GroupId 'zzzzzzzz-6666-8888-9999-pppppppppppp' -All

Id                                   DeletedDateTime
--                                   ---------------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
bbbbbbbb-1111-2222-3333-cccccccccccc
cccccccc-2222-3333-4444-dddddddddddd
dddddddd-3333-4444-5555-eeeeeeeeeeee

This example demonstrates how to retrieve the all owner of a specific group.

  • -GroupId Parameter specifies the ID of a group.

Example 3: Gets two group owners

Connect-Entra -Scopes 'GroupMember.Read.All'
Get-EntraGroupOwner -GroupId 'vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj' -Top 2

Id                                   DeletedDateTime
--                                   ---------------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
bbbbbbbb-1111-2222-3333-cccccccccccc

This example demonstrates how to retrieve the top two owners of a specific group.

  • -GroupId parameter specifies the ID of a group.

Parameters

-All

List all pages.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GroupId

Specifies the ID of a group in Microsoft Entra ID.

Type:System.String
Aliases:ObjectId
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Property

Specifies properties to be returned.

Type:System.String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Top

Specifies the maximum number of records to return.

Type:System.Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False