How to create a user in azure active directory

In this azure active directory tutorial, we will discuss how to create a user in azure active directory. Apart from this, we will also discuss below things:

  • Create a user in Azure active directory
  • Create guest accounts in Azure Active Directory
  • How to create multiple user accounts in active directory
  • Create a user in Azure AD using C#.Net
  • Create a user in Azure AD using PowerShell
  • Create multiple user accounts in active directory using PowerShell
  • Update user details in Azure AD
  • What is Azure Active Directory User Account
  • When creating a new user in Microsoft Azure, how is the initial password determined?
  • Azure Active Directory Tutorial

Create a user (account) in Azure active directory

Now, we will see how to create a user in Azure active directory from the Azure portal.

We can create an user account from the Azure Portal as well as from the Azure AD portal.

Login to Azure Portal. Then click on Users from the home page.

create user account in Azure active directory

Or you can login to Azure AD. Then click on Azure Active Directory like below:

create user in Azure active directory

Or you can also directly click on the Add a user from the Quick Tasks.

How to create user in Azure active directory

Then it will open the All users page where you can see all the users. Click on + New user like below:

create user account in Azure active directory
how to create bulk users in active directory using .csv file

Then select option “Create user”, then provide the user details like below:

  • User name: Provide the user name, it will display a notification if the user name already exists.
  • Name: Provide the full name or display name
  • First name: Provide the first name
  • Last name: Provide the last name
How to create user account in Azure active directory
how to create bulk users in active directory

Then you can create a password or you can have the auto-generate password.

If you want to add user to a group, you can add in the Groups and roles section.

You can also enable or disable Block sign in by selecting the Yes/No option in the Settings.

Also, you can select the Usage location basically the Country.

create user in azure ad

You can also click on the 0 groups selected link and then select the group name.

Like you can see the user will be added to the Global administrator.

Assign user to global administrator

Then select the Job title and Department of the user like below:

how to create user in azure ad

Then click on the Create button which will create the user. You can see the user created like below:

how to create a new user in azure

This way, we can create a user in Azure active directory from the Azure portal.

Create guest accounts in Azure Active Directory

Now, we will see how to create guest accounts in Azure active directory.

In the same New user screen, click on Invite user and then fill the details like:

  • Name: Full name or the display name
  • Email address: Any user personal email address
  • First name: User’s first name
  • Last name: User’s second name
Create guest accounts in Azure Active Directory

Apart from that, you can provide Group, or Job info and click on Invite.

Once the user invited, you can see the user will be displayed as the Guest user.

Create guest accounts in Azure Active Directory

User will also receive an email with the invitation with a link to accept the invitation.

add guest user to azure active directory

User needs a Microsoft account to accept the invitation.

This way, we can add guest user to azure active directory.

How to create multiple user accounts in azure active directory

Now, we will see how to create multiple users accounts in azure active directory from the portal.

In the All Users, click on Bulk Create like below:

create multiple user accounts in azure active directory

Here, you can select the Download csv template, which will be a template and you can follow on which format you can upload multiple users to Azure active directory.

create bulk user in azure active directory

Then, you can upload the CSV file to create bulk users in azure active directory.

bulk update azure ad users

Then click on Submit and it will display the progress like below:

create bulk users in azure active directory

It will show a successful message once the bulk users will be added to azure ad.

Then if you will refresh the All Users page, you can see the users created successfully.

bulk create azure ad

This is how we can create multiple users accounts in Azure active directory or you can add bulk users in azure active directory from a .csv file.

Create a user in Azure active directory using C#.Net

I have created a separate post on how to create a user in Azure active directory using C#.

Create a user in Azure active directory using PowerShell

Now, we will see how to create a user in Azure AD using PowerShell.

If you are new to Azure PowerShell, check out an article on How to Connect to Azure and Azure Active Directory (Azure AD) from PowerShell.

We can use the New-AzureADUser PowerShell cmdlets to create a user in azure.

Run the below command in Windows PowerShell ISE.

Connect-AzureAD
$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile
$PasswordProfile.Password = "Dummy@Password"
New-AzureADUser -DisplayName "User10" -PasswordProfile $PasswordProfile -UserPrincipalName "User10@spskytraining.onmicrosoft.com" -AccountEnabled $true -MailNickName "User10"

Once you run the command, you can see in the Azure Portal or Azure AD portal, the use got created.

Create a user in Azure active directory using PowerShell
how to create multiple users in active directory using powershell

Also, you can use the New-MsolUser cmdlet to create an user in Azure AD.

You can run the below command.

Connect-MSOlService
New-MsolUser -DisplayName "Test User" -FirstName Test -LastName User -UserPrincipalName TestUser@spskytraining.onmicrosoft.com -Password Hello@12345

You can see the user got created like below:

create an user in azure ad powershell
new-azureaduser

This is how we can create user in Azure AD using PowerShell.

Create multiple user accounts in Azure active directory using PowerShell

Now, we will see how to create multiple users or bulk users from .csv file in azure active directory using PowerShell.

Here I have a .csv file which has the below data and columns.

UserPrincipalNameFirstNameLastNameDisplayName
User15@SPSkyTraining.onmicrosoft.comUser15SUser15 S
User16@SPSkyTraining.onmicrosoft.comUser16KUser16 K
User17@SPSkyTraining.onmicrosoft.comUser17PUser17 P
how to create bulk users in active directory using csv file

Add users to azure active directory PowerShell

Save it in you local system and run the below command:

Connect-MSOlService
Import-Csv -Path "E:\Bijay\ADUsers.csv" | foreach {New-MsolUser -DisplayName $_.DisplayName -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $_.UserPrincipalName} | Export-Csv -Path "E:\Bijay\ADUsersResults.csv"

Here I have added the above columns, if you want to add more parameters you can add like below:

Connect-MSOlService
Import-Csv -Path "E:\Bijay\ADUsers.csv" | foreach {New-MsolUser -DisplayName $_.DisplayName -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $_.UserPrincipalName -UsageLocation $_.UsageLocation -LicenseAssignment $_.AccountSkuId} | Export-Csv -Path "E:\Bijay\ADUsersResults.csv"

You can also check the E:\Bijay\ADUsersResults.csv file for more details.

Once it runs successfully, you can see the users added successfully like below:

Create multiple user accounts in Azure active directory using PowerShell

This is how we can create multiple user accounts in Azure active directory using PowerShell.

Update User Details in Azure Active Directory

Now, we will see how to update user details in the Azure Active Directory (Azure AD). We can update personal information, Job Information, Contact Information, etc. Apart from that, we can also update the user photo in Azure AD.

From the All Uers page, click on the particular user whose information you want to update.

update user information in azure ad

Then click on the Edit button like below:

update azure ad username

Then the information will be opened in the Edit mode, you can see below I have uploaded a new user photo for the use in Azure AD.

how to upload user photo in azure ad

Apart from this, on the same page, you can update other user’s information in Azure AD.

What is Azure Active Directory User Account

Azure Active Directory account is the account that can be used to perform many tasks in the Azure Active Directory. You can create the Azure Active Directory user account using the Azure Portal or Azure AD portal. Check out how to create the Azure Active Directory User Account now.

When creating a new user in Microsoft Azure, how is the initial password determined?

Basically, the initial password is determined using the below steps

  1. The first step is to create a variable using the New-Object PowerShell cmdlet.
  2. The next step is to set the password in that variable that you have created above.
  3. You can use the New-AzureADUser PowerShell cmdlet to create the new user.
  4. Now in the next step, now PowerShell will return the new user object that you have created above and will also display the ObjectId.

Azure Active Directory Tutorial

Azure Active Directory is the cloud version of Active Directory. It also is popularly known as Azure AD. You can check out a complete Azure Active Directory Tutorial now.

In this tutorial we learned:

  • How to create a user (account) in Azure active directory
  • How to create guest accounts in Azure Active Directory
  • How to create multiple users accounts in azure active directory
  • How to create a user in Azure AD using C#.Net
  • How to create a user in Azure AD using PowerShell
  • How to create multiple users accounts in Azure active directory using PowerShell
  • How to update User Details in Azure Active Directory
  • What is Azure Active Directory User Account
  • When creating a new user in Microsoft Azure, how is the initial password determined?
  • Azure Active Directory Tutorial