Set-EntraUserManager
Updates a user's manager.
Syntax
Default (Default)
Set-EntraUserManager
-UserId <String>
-ManagerId <String>
[<CommonParameters>]
Description
The Set-EntraUserManager
cmdlet update the manager for a user in Microsoft Entra ID. Specify the UserId
and ManagerId
parameters to update the manager for a user in Microsoft Entra ID.
Examples
Example 1: Update a user's manager
Connect-Entra -Scopes 'User.ReadWrite.All'
Set-EntraUserManager -UserId 'SawyerM@contoso.com' -ManagerId 'Manager@contoso.com'
This example demonstrates how to update the manager for the specified user.
Parameters
-ManagerId
Specifies the ID of the Microsoft Entra ID object to assign 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 |
-UserId
Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ObjectId, UPN, Identity, UserPrincipalName |
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.