Remove-EntraAdministrativeUnitMember

Removes an administrative unit member.

Syntax

Remove-EntraAdministrativeUnitMember
      -AdministrativeUnitId <String>
      -MemberId <String>
      [<CommonParameters>]

Description

The Remove-EntraAdministrativeUnitMember cmdlet removes an administrative unit member in Microsoft Entra ID. Specify AdministrativeUnitId and MemberId to remove an administrative unit member.

To remove a member from an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra.

Examples

Example 1: Remove an administrative unit member

Connect-Entra -Scopes 'AdministrativeUnit.Read.All'
$administrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq 'Pacific Administrative Unit'"
$adminUnitMember = Get-EntraAdministrativeUnitMember -AdministrativeUnitId $administrativeUnit.Id | Select-Object Id, DisplayName,'@odata.type' | Where-Object {$_.DisplayName -eq 'Saywer Miller'}
Remove-EntraAdministrativeUnitMember -AdministrativeUnitId $administrativeUnit.Id -MemberId $adminUnitMember.Id

This command removes a specified member (user or group) from a specified administrative unit.

  • -AdministrativeUnitId parameter specifies the ID of an administrative unit.
  • -MemberId parameter specifies the ID of the administrative unit member.

Parameters

-AdministrativeUnitId

Specifies the ID of an administrative unit in Microsoft Entra ID.

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

-MemberId

Specifies the ID of the administrative unit member.

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