Add-EntraBetaAdministrativeUnitMember
Adds an administrative unit member.
Syntax
Default (Default)
Add-EntraBetaAdministrativeUnitMember
-MemberId <String>
-AdministrativeUnitId <String>
[<CommonParameters>]
Description
The Add-EntraBetaAdministrativeUnitMember cmdlet adds a Microsoft Entra ID administrative unit member.
Administrative units enable more granular management of permissions and access, particularly in large organizations or where administrative responsibilities are divided across departments or regions.
In delegated scenarios, adding a user, group, or device to an administrative unit requires:
- Privileged Role Administrator
Examples
Example 1: Add an administrative unit member
Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All'
$administrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq '<administrativeunit-display-name>'"
$user = Get-EntraBetaUser -UserId 'SawyerM@contoso.com'
Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId $administrativeUnit.Id -MemberId $user.Id
This example demonstrates adding an administrative unit member. Use Get-EntraBetaAdministrativeUnit to find the administrative unit ID and Get-EntraBetaUser to find the user ID.
AdministrativeUnitIdparameter specifies the ID of an administrative unit.MemberIdparameter specifies the ID of the user you want to add as a member of the administrative unit.
Example 2: Add a group to an administrative unit
Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All'
$administrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq '<administrativeunit-display-name>'"
$group = Get-EntraBetaGroup -SearchString 'Sales and Marketing'
Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId $administrativeUnit.Id -MemberId $group.Id
This example demonstrates adding an administrative unit member. Use Get-EntraBetaAdministrativeUnit to find the administrative unit ID and Get-EntraBetaGroup to find the group ID.
AdministrativeUnitIdparameter specifies the ID of an administrative unit.MemberIdparameter specifies the ID of the group you want to add as a member of the administrative unit.
Example 3: Add a device to an administrative unit
Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All'
$administrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq '<administrativeunit-display-name>'"
$device = Get-EntraBetaDevice -SearchString 'ContosoDesktop01'
Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId $administrativeUnit.Id -MemberId $device.Id
This example demonstrates adding an administrative unit member. Use Get-EntraBetaAdministrativeUnit to find the administrative unit ID and Get-EntraBetaDevice to find the device ID.
AdministrativeUnitIdparameter specifies the ID of an administrative unit.MemberIdparameter specifies the ID of the device you want to add as a member of the administrative unit.
Parameters
-AdministrativeUnitId
Specifies the ID of a Microsoft Entra ID administrative unit.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ObjectId |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-MemberId
Specifies the unique ID of the specific Microsoft Entra ID object that is assigned as owner/manager/member.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | RefObjectId |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.