Creating Users
- Authors
- Name
- Michael Bui
 
 
Overview
In this lab we're going to create users using 3 different methods
- Azure Portal, Azure CLI, and Azure PowerShell
Instructions
Azure Portal
Create a user with the following configurations
| username | buitest1 | 
|---|---|
| Name | Bui Test1 | 
| Initial Password | Passw0rd | 
| Block signing | yes | 
| We're blocking signin so no one can log into this account | 
- Click on + New User  
- Fill in the user information
Azure CLI
Documentation: Microsoft Docs
Create a user with the following Azure CLI is currently not as feature rich as the Portal / PowerShell
| username | buicli | 
|---|---|
| Initial Password | Passw0rd | 
The following options are available:
az ad user create --display-name
                  --password
                  --user-principal-name
                  [--force-change-password-next-sign-in {false, true}]
                  [--immutable-id]
                  [--mail-nickname]
- Run the following command to create the user
az ad user create --display-name buicli --password Passw0rd --user-principal-name buicli@builab.ca
PowerShell
Documentation: Microsoft Docs
PowerShell creation is highly customizable and great to learn for automating user setup
Connect-AzureAD
run this before running other cmdlets to connect
- Run the following to create the user
$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile
$PasswordProfile.Password = "Passw0rd"
New-AzureADUser -DisplayName "buiPS" -PasswordProfile $PasswordProfile -UserPrincipalName "buiPS@builab.ca" -AccountEnabled $False -MailNickName "buiPS"
- You'll get text confirming the creation of the user object 