Create Microsoft Entra User Accounts via PowerShell or Admin Center
- Last updated: Apr 12, 2025
Entra ID can be seen as the cloud directory for Microsoft cloud services such as Microsoft Azure, Microsoft 365. It also handles identity management. Here I'll show how to create user accounts with PowerShell and from the Microsoft Entra admin center web interface.
Web Admin Center Interface
Open a web browser and enter https://entra.microsoft.com in the address bar.
- Sign in with administrator credentials:

- In the navigation pane, click on All Users:

- Click on New user, then select Create new user:

- Enter the User principal name, the Display Name and set the password if necessary. Finally, click Next: Properties:

- Enter information such as First Name, Last Name and Usage location, then click Next: Assignments:

- Assign the User to a Group if necessary, then click Next: Properties:

- Check that the information provided on this page is correct and then click on Create:

Create users by using PowerShell
- If not already done, install Microsoft.Graph API for current user:
PS C:\> Install-Module Microsoft.Graph -Scope CurrentUser
- The PowerShell script execution policy must be set to remote signed or less restrictive. Otherwise, you may encounter the error
Connect-MgGraph : An error occurred when writing to a listener.
when attempting to connect:
PS C:\> PowerShell.exe -ExecutionPolicy RemoteSigned
- Import the
Microsoft.Graph
module:
PS C:\> Import-Module Microsoft.Graph.Authentication
- Optionally, the
Microsoft.Graph
module can be updated using:
PS C:\> Update-Module Microsoft.Graph
- Connect to the
Microsoft.Graph
API using administrator credentials:
PS C:\> Connect-MgGraph
- Enter administrator credentials to connect:

- Define the password profile:
PS C:\> $PWProfile = @{
Password = "A1TimePass!";
ForceChangePasswordNextSignIn = $true
}
- Create the new user:
PS C:\> New-MgUser `
-DisplayName "Eric Cartman" `
-GivenName "Eric" -Surname "Cartman" `
-MailNickname "e.cartman" `
-UsageLocation "US" `
-UserPrincipalName "e.cartman@std.rocks" `
-PasswordProfile $PWProfile -AccountEnabled `
-Department "fourth grade" -JobTitle "fatass" -CompanyName "Schoooool"