Managing Microsoft Entra ID group ownership is vital for maintaining proper administrative control and ensuring accountability. IT administrators often need to remove group owners to reflect organizational changes, enforce governance policies, or reassign responsibilities. While the Remove-MgGroupOwnerByRef PowerShell command in Microsoft Graph allows admins to remove owners using direct references, it requires scripting expertise and manual execution.
ManageEngine ADManager Plus is an identity governance and administration solution with comprehensive Microsoft Entra ID management and reporting capabilities. It offers powerful management actions to help administrators seamlessly remove Microsoft Entra ID owners in bulk without any scripting.
Choose to remove group owners from the radio button options.
Import the CSV file containing the required data or select groups manually.
Before running the Remove-MgGroupOwnerByRef cmdlet, ensure the following requirements are met:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "Group.ReadWrite.All"
Use the Remove-MgGroupOwnerByRef cmdlet in Microsoft Graph PowerShell to delete Microsoft Entra ID group owners. The syntax is as follows:
Remove-MgGroupOwnerByRef
-InputObject <IGroupsIdentity>
[-IfMatch <String>]
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-PassThru]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Example: Delete the owner of a group
Use this Graph PowerShell command to remove the owner of a Microsoft Entra ID group.
Import-Module Microsoft.Graph.Groups
Remove-MgGroupOwnerByRef -GroupId $groupId -DirectoryObjectId $directoryObjectId
The table below lists key parameters that can be used with the Remove-MgGroupOwnerByRef cmdlet to remove owners of Microsoft Entra ID groups.
| Parameters | Description |
|---|---|
| -Confirm | This is to confirm before running the cmdlet. |
| -DirectoryObjectId | This is the unique identifier of the directory object. |
| -GroupID | This is the unique identifier of a group. |
| -WhatIf | This shows what would happen if the cmdlet was run. |