Add-EntraGroupOwner
Add a user or service principal as an owner of a Microsoft 365 or security group.
Syntax
Add-EntraGroupOwner
-GroupId <String>
-OwnerId <String>
[<CommonParameters>]
Description
The Add-EntraGroupOwner
cmdlet adds a user or service principal as an owner of a Microsoft 365 or security group. Owners can modify the group.
In delegated scenarios, the signed-in user must have either a supported Microsoft Entra role or a custom role with the necessary permissions. The minimum roles required for this operation are:
- Group owners
- User Administrator
- Directory Writers
- Groups Administrator
Examples
Example 1: Add an owner to a group
Connect-Entra -Scopes 'Group.ReadWrite.All'
$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'"
$user = Get-EntraUser -UserId 'SawyerM@contoso.com'
Add-EntraGroupOwner -GroupId $group.Id -OwnerId $user.Id
This example demonstrates how to add an owner to a group.
-GroupId
- Specifies the unique identifier (Object ID) of the group to which you want to add an owner.-OwnerId
- Specifies the unique identifier (Object ID) of the owner to be added to the group.
Parameters
-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 |
-OwnerId
Specifies the Object ID of a user or service principal to assign as a group owner.
Type: | System.String |
Aliases: | RefObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |