New-MgUser
CautionCreate cloud users
New-MgUser -DisplayName <n> -UserPrincipalName <upn> -MailNickname <nick> -AccountEnabled -PasswordProfile @{...}
Creates an Entra ID user via Graph; force a first-sign-in password change, then assign licenses.
Examples
New-MgUser -DisplayName '山田太郎' -UserPrincipalName [email protected] -MailNickname taro -AccountEnabled -PasswordProfile @{Password='TempP@ss1';ForceChangePasswordNextSignIn=$true}Onboard a new user
Syntax
New-MgUser -DisplayName n -UserPrincipalName upn -MailNickname nick -AccountEnabled -PasswordProfile @{Password='...';ForceChangePasswordNextSignIn=$true}
Before you run it
Hand over initial passwords securely.
Related commands
- Get-MgUserInspect Entra users
- Set-MgUserLicenseAssign/remove licenses
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store