Copy-ready commandUpdate-MgUser — Basic Usage
Update-MgUser -UserId user@contoso.com -Department ITProduction warning
Directory write operations can affect tenant access.
Requirements and permissions
- Requirements
- Microsoft.Graph PowerShell SDK
- Permissions
- Graph delegated or application permissions
- Last reviewed
- 2026-07-31
Examples
Basic Usage
Use Update-MgUser for a standard administrative task.
Update-MgUser -UserId user@contoso.com -Department ITOriginal command
Update a Microsoft Entra ID user.
Update-MgUser -UserId user@contoso.com -Department ITCommon errors
Command not found
Confirm Microsoft.Graph PowerShell SDK is installed and available in your current shell.