-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Exam Ref AZ-104 Microsoft Azure Administrator Certification and Beyond
By :

Bulk Microsoft Entra ID operations refer to the ability to perform a single action or update across multiple users, groups, or other objects in Microsoft Entra ID. This can be especially useful for larger organizations with hundreds or thousands of users, where manual updates to each individual object would be time-consuming and inefficient. Bulk operations in Microsoft Entra ID can be performed using PowerShell, Graph API, or other supported methods. Common bulk operations include adding or removing users from groups, updating user attributes, and managing device settings. We will explore more about the bulk operations you can perform and how they work in the following section.
Some of the popular operations you will learn about in this book perform bulk updates, such as the following:
Performing bulk user updates is like managing single users (such as internal and guest users). The only property that can’t be set for multiple users is resetting a password, which must be done for a single user.
Azure has also improved its bulk user settings by adding a drop-down menu that enables you to perform updates via the downloadable CSV template, which you then re-upload.
To download a user list, you can follow the given steps:
Users
overview blade again in Microsoft Entra ID. You should automatically go into the All users
blade; if not, select that option.Download users
from the top menu.Figure 2.30: Bulk operations – clicking Download users
Start
. This will be saved as a .csv
file, which can be opened in Microsoft Excel if you desire for easy editing. A free version can be used with Microsoft 365 Office online. You can read more about this at this link: https://www.microsoft.com/en-us/microsoft-365/free-office-online-for-the-web. Being a comma-separated file type, where each value is separated by a comma, you can use any text editor, such as Windows Notepad.
Figure 2.31: Bulk operations – Download users
Figure 2.32: Downloading the user’s CSV file
When opening the file, if you are presented with what looks like gibberish, you can do the following in Excel to format it neatly for yourself:
A
column to select all the data:Figure 2.33: Bulk operations – selecting the A column in Excel
Data
tab from the top menu bar, and then select Text to Columns
from the Data
Tools
context.Figure 2.34: Bulk operations – selecting Text to Columns in Excel
Delimited
and then Next
.Figure 2.35: Bulk Operations – Delimited in Excel
Comma
, and then click Next >
.Figure 2.36: Bulk operations – selecting Comma
General
for Column data format
, and then click Finish
.
Figure 2.37: Bulk Operations – selecting the column data format in Excel
Now, your data will be organized neatly into columns. Next, you will learn how to use this sheet to perform bulk deletion operations in Microsoft Entra ID.
To demonstrate a bulk deletion, you will select and keep the users you want to retain in the sheet and delete the rows with the remaining users:
Users
blade and select All users
.Bulk operations
and then Bulk delete
.Figure 2.38: Microsoft Entra ID – Bulk delete
Download
.
Figure 2.39: Microsoft Entra ID – the bulk delete template
Save
once you are finished and close the Excel sheet.
Figure 2.40: Bulk Operations – selecting users to delete in Excel
Select a file
option from the previous screen. From the open file dialog that pops up, navigate to your file, and then click Open
.Yes
for the Are you sure you want to perform the delete operation?
option, and then click Submit
. You will be presented with a success notification once completed successfully.You can also update multiple users by selecting them and choosing to delete them, or you can configure MFA for each user from the Azure portal in the Users
blade:
Figure 2.41: An alternative bulk user delete method
This concludes our demonstration of how to perform bulk user deletion operations using the Azure portal. Next, we will take a look at a PowerShell script that I think can help you achieve bulk user creation.
You will now experience running a PowerShell script to enable you to create Microsoft Entra ID users quickly and programmatically in your environment. The following script will create several demo users with a predefined password for you:
.ps1
file, with whatever name prefix you want. To follow this exercise, it is advised that you save the file in C:\Scripts
on your computer and name it Create_AzureAD_Users.ps1
. You will need to populate the $TenantId
and $DomainSuffix
details in between the inverted commas on the right.Create_AzureAD_Users.ps1
# Enter the Tenant ID for your Azure AD $TenantId = "" # Populate your Domain Suffix $DomainSuffix = "" # List of usernames to create $UserNames = @( "John Smith", "Jane Doe", "Robert Johnson",
The complete code is available at https://packt.link/CEwga
C:\Scripts
), and then open PowerShell.cd
and the path to your script, and then press the Enter key.Figure 2.42: Changing the directory on PowerShell
.\
and start typing your script name. The .\
notation means that you will look in the path that you are currently in – in my example, C:\Scripts
. Click Enter once you have your script.Figure 2.43 – Launching the Create_EntraID_Users script
Figure 2.44: Azure’s Sign in prompt
Microsoft Entra ID
, and then the Users
blade. You should see your new users there.This concludes our demonstration on how to perform bulk user creations using a PowerShell script, helping you to achieve a consistent deployment methodology that can also save you time.
Note
You are encouraged to read further by using the following links, which look at adding bulk users:
https://learn.microsoft.com/en-us/entra/identity/users/users-bulk-add
https://learn.microsoft.com/en-us/entra/identity/users/groups-bulk-import-members
In the next section, we are going to cover how you can manage guest accounts.