Get-EntraAdministrativeUnitMember
Gets a member of an administrative unit.
Syntax
Get-EntraAdministrativeUnitMember
-AdministrativeUnitId <String>
[-All]
[-Top <Int32>]
[-Property <String[]>]
[<CommonParameters>]
Description
The Get-EntraAdministrativeUnitMember
cmdlet gets a member of a Microsoft Entra ID administrative unit. Specify AdministrativeUnitId
parameters to retrieve an administrative unit member.
In delegated scenarios with work or school accounts, the signed-in user must either be a member user or be assigned a supported Microsoft Entra role, or a custom role with the necessary permissions. The following least privileged roles are supported for this operation:
- Directory Readers: Read basic properties on administrative units
- Global Reader: Read all properties of administrative units, including members
- Privileged Role Administrator: Create and manage administrative units (including members)
Examples
Example 1: Get an administrative unit member by AdministrativeUnitId
Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All'
$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq '<administrativeunit-display-name>'"
Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id
Id DeletedDateTime
-- ---------------
bbbbbbbb-1111-2222-3333-cccccccccccc
cccccccc-2222-3333-4444-dddddddddddd
dddddddd-3333-4444-5555-eeeeeeeeeeee
eeeeeeee-4444-5555-6666-ffffffffffff
ffffffff-5555-6666-7777-aaaaaaaaaaaa
This example returns the list of administrative unit members from specified administrative unit AdministrativeUnitId.
-AdministrativeUnitId
parameter specifies the ID of an administrative unit.
Example 2: Get all administrative unit members by AdministrativeUnitId
Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All'
$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq '<administrativeunit-display-name>'"
Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -All
Id DeletedDateTime
-- ---------------
bbbbbbbb-1111-2222-3333-cccccccccccc
cccccccc-2222-3333-4444-dddddddddddd
dddddddd-3333-4444-5555-eeeeeeeeeeee
eeeeeeee-4444-5555-6666-ffffffffffff
ffffffff-5555-6666-7777-aaaaaaaaaaaa
This example returns the list of all administrative unit members from specified administrative unit AdministrativeUnitId.
-AdministrativeUnitId
parameter specifies the ID of an administrative unit.
Example 3: Get top three administrative unit members by AdministrativeUnitId
Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All'
$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq '<administrativeunit-display-name>'"
Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -Top 3
Id DeletedDateTime
-- ---------------
bbbbbbbb-1111-2222-3333-cccccccccccc
cccccccc-2222-3333-4444-dddddddddddd
dddddddd-3333-4444-5555-eeeeeeeeeeee
This example returns top three administrative unit members from specified administrative unit AdministrativeUnitId.
-AdministrativeUnitId
parameter specifies the ID of an administrative unit.
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 |
-All
List all pages.
Type: | System.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
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 |