Sample
Sample
Microsoft Azure
Administrator
Second Edition
Charles Pluta
Exam Ref AZ-104 Microsoft Azure Administrator,
Second Edition CREDITS
Published with the authorization of Microsoft Corporation by: Pearson
Education, Inc. EDITOR-IN-CHIEF
Brett Bartow
Copyright © 2025 by Pearson Education, Inc. EXECUTIVE EDITOR
Hoboken, New Jersey Loretta Yates
All rights reserved. This publication is protected by copyright, and permission ASSOCIATE EDITOR
must be obtained from the publisher prior to any prohibited reproduction, Shourav Bose
storage in a retrieval system, or transmission in any form or by any means, DEVELOPMENT EDITOR
electronic, mechanical, photocopying, recording, or likewise. For information Songlin Qiu
regarding permissions, request forms, and the appropriate contacts within the
Pearson Education Global Rights & Permissions Department, please visit MANAGING EDITOR
www.pearson.com/permissions. Sandra Schroeder
SPECIAL SALES
For information about buying this title in bulk quantities, or for special sales
opportunities (which may include electronic versions; custom cover designs;
and content particular to your business, training goals, marketing focus, or
branding interests), please contact our corporate sales department at
corpsales@pearsoned.com or (800) 382-3419.
Acknowledgments x
About the author x
Introduction xi
Index 362
Contents
Introduction xi
Organization of this book xi
Preparing for the exam xi
Microsoft certifications xii
Access the exam updates chapter and online references xii
Errata, updates & book support xiii
Stay in touch xiii
v
Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Thought experiment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Skill 2.3: Configure Azure Files and Azure Blob Storage. . . . . . . . . . . . . . . . . 101
Create and configure a file share in Azure Storage 102
Configure Azure Blob Storage 106
Configure storage tiers 110
Configure soft delete, versioning, and snapshots 113
Configure blob lifecycle management 117
vi Contents
Export a deployment template 137
Interpret and modify a Bicep file 140
Contents vii
Configure user-defined network routes 231
Troubleshoot network connectivity 239
viii Contents
Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Index 362
Contents ix
Acknowledgments
I would like to acknowledge my wife, Jennifer, who has supported the unusual hours for
projects such as this for over a decade now. I would also like to acknowledge my best friends
and colleagues who allow me to bounce ideas off them, provide guidance to them, and share
laughs with them: Elias Mereb, Joshua Waddell, Ed Gale, and Aaron Lines. Finally, I have to
thank my manager, Julia Nathan, who has been an exemplary coach and role model and
continues to support my work on projects such as this book.
x
Introduction
S ome books take a very low-level approach, teaching you how to use individual classes and
accomplish fine-grained tasks. Like the Microsoft AZ-104 certification exam, this book takes a
high-level approach, building on your foundational knowledge of Microsoft Azure and common
administrative actions to take in an Azure environment. We provide walk-throughs using the
Azure portal; however, the exam might also include questions that use PowerShell or the Azure
Command Line Interface (CLI) to perform the same task. You might encounter questions on the
exam focused on these additional areas that are not specifically included in this Exam Ref.
This book covers every major topic area found on the exam, but it does not cover every
exam question. Only the Microsoft exam team has access to the exam questions, and Microsoft
regularly adds new questions to the exam, making it impossible to cover specific questions.
You should consider this book a supplement to your relevant real-world experience and other
study materials. If you encounter a topic in this book that you do not feel completely comfort-
able with, use the “Need more review?” links you’ll find in the text to find more information
and take the time to research and study the topic.
xi
Note that this Exam Ref is based on publicly available information about the exam and the
author’s experience. To safeguard the integrity of the exam, authors do not have access to the
live exam.
Microsoft certifications
Microsoft certifications distinguish you by proving your command of a broad set of skills and
experience with current Microsoft products and technologies. The exams and corresponding
certifications are developed to validate your mastery of critical competencies as you design
and develop, or implement and support, solutions with Microsoft products and technologies
both on-premises and in the cloud. Certification brings a variety of benefits to the individual
and to employers and organizations.
xii Introduction
Errata, updates & book support
We’ve made every effort to ensure the accuracy of this book and its companion content.
You can access updates to this book—in the form of a list of submitted errata and their related
corrections—at
MicrosoftPressStore.com/ERAZ1042e/errata
If you discover an error that is not already listed, please submit it to us at the same page.
For additional book support and information, please visit MicrosoftPressStore.com/Support.
Please note that product support for Microsoft software and hardware is not offered
through the previous addresses. For help with Microsoft software or hardware, go to support.
microsoft.com.
Stay in touch
Let's keep the conversation going! We're on X/Twitter: twitter.com/MicrosoftPress.
Introduction xiii
CHAPTER 2
The sections in this chapter align with the objectives that are listed in the AZ-104 study guide
from Microsoft. However, the sections are presented in an order that is designed to help you
learn and do not directly match the order that is presented in the study guide. On the exam,
questions will appear from different sections in a random order. For the full list of objectives,
visit https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/
az-104.
65
This skill covers how to:
■■ Create and configure storage accounts
■■ Configure Azure Storage firewalls and virtual networks
■■ Create and use shared access signature (SAS) tokens
■■ Configure stored access policies
■■ Manage access keys
■■ Configure identity-based access
Account types
There are three possible storage account types for the Standard tier: StorageV2 (General-
Purpose V2), Storage (General-Purpose V1), and BlobStorage. There are four possible storage
account types for the Premium tier: StorageV2 (General-Purpose V2), Storage (General-
Purpose V1), BlockBlobStorage, and FileStorage. Table 2-1 shows the features for each kind of
account. Key points to remember are
■■ The Blob Storage account is a specialized storage account used to store Block Blobs and
Append Blobs. You can’t store Page Blobs in these accounts; therefore, you can’t use
them for unmanaged disks.
■■ Only General-Purpose V2 and Blob Storage accounts support the Hot, Cool, and Archive
access tiers.
General-Purpose V1 and Blob Storage accounts can both be upgraded to a General-Purpose
V2 account. This operation is irreversible. No other changes to the account kind are supported.
Standard General-Purpose V1 and standard Blob Storage accounts are considered legacy
storage accounts, and they can be deployed but are not recommended by Microsoft. You can
find more information about legacy storage account types at https://learn.microsoft.com/
en-us/azure/storage/common/storage-account-overview#legacy-storage-account-types.
Services supported Blob, File, Blob, File, Blob (Block Blobs Blob (Block File only
Queue, Table Queue, Table and Append Blobs and
Blobs only) Append Blobs
only)
Supported Access Hot, Cool, N/A Hot, Cool, Archive N/A N/A
Tiers Archive
Replication LRS, ZRS, GRS, LRS, GRS, LRS, GRS, RA-GRS LRS, ZRS LRS, ZRS
Options RA-GRS, GZRS, RA-GRS
RA-GZRS
Replication options
When you create a storage account, you can also specify how your data will be replicated for
redundancy and resistance to failure. There are four options, as described in Table 2-2.
Locally redundant storage Makes three synchronous copies of your data within a single datacenter.
(LRS) Available for General-Purpose or Blob Storage accounts, at both the
Standard and Premium Performance tiers.
Zone redundant storage Makes three synchronous copies to three separate availability zones within a
(ZRS) single region.
Available for General-Purpose V2 storage accounts only, at the Standard
Performance tier only. Also available for Block Blob Storage and File Storage
accounts.
Geographically redundant This is the same as LRS (three local synchronous copies), plus three additional
storage asynchronous copies to a second Azure region hundreds of miles away
(GRS) from the primary region. Data replication typically occurs within 15 minutes,
although no SLA is provided.
Available for General-Purpose or Blob Storage accounts, at the Standard
Performance tier only.
Read access geographically This has the same capabilities as GRS, plus you have read-only access to the
redundant storage data in the secondary data center.
(RA-GRS) Available for General-Purpose or Blob Storage accounts, at the Standard
Performance tier only.
Geographically zone This is the same as ZRS (three synchronous copies across multiple availability
redundant storage (GZRS) zones in the selected region), plus three additional asynchronous copies to
a different Azure region hundreds of miles away from the primary region.
Data replication typically occurs within 15 minutes, although no SLA is
provided.
Available for General-Purpose v2 storage accounts only, at the Standard
Performance tier only.
Read access geographically This has the same capabilities as GZRS, plus you have read-only access to the
zone redundant storage data in the secondary data center.
(RA-GZRS) Available for General-Purpose V2 storage accounts only, at the Standard
Performance tier only.
These replication options control the level of durability and availability of the storage account.
When the entire datacenter is unavailable, LRS would incur an outage. If the primary region
is unavailable, both the LRS and ZRS options would incur an outage, but the GRS and GZRS
options would still provide the secondary region that takes care of the requests during the
outage. However, not all the replication options are available in all regions. You can find sup-
ported regions with these replication options at https://learn.microsoft.com/en-us/azure/
storage/common/storage-redundancy.
When creating a storage account via the Azure portal, the replication and performance tier
options are specified using separate settings. When creating an account using Azure Power-
Shell, the Azure CLI, or via a template, these settings are combined within the SKU setting.
For example, to specify a Standard storage account using locally redundant storage using the
Azure CLI, use --sku Standard_LRS.
Access tiers
Azure Blob Storage supports four access tiers: Hot, Cool, Cold, and Archive. Each represents
a trade-off of availability and cost. There is no trade-off on the durability (probability of data
loss), which is defined by the SKU and replication, not the access tier.
Access tiers apply to Block Blob Storage only. They do not apply to other storage services,
including append or page Blob Storage.
Currently, the Archive tier is not supported for ZRS, GZRS, or RA-GZRS accounts.
FIGURE 2-1 Creating an Azure storage account using the Azure portal
FIGURE 2-2 The advanced settings that can be set when creating an Azure storage account using the
portal
The Networking tab of the Create A Storage Account blade is shown in Figure 2-3. On
this tab, choose to maintain storage account access either publicly by choosing Enable Public
Access From All Networks or privately by choosing Disable Public Access And Use Private
Access.
The Data Protection tab provides options for configuring the recovery, tracking, and
access control of the storage account. This includes soft delete options, retention periods,
blob versioning, and version-level immutability support. Figure 2-4 shows the Data
Protection tab.
The Encryption tab provides options for configuring the encryption type, support for
customer-managed keys, and infrastructure encryption. By default, storage accounts are
encrypted using Microsoft-managed keys. However, you can configure customer-managed
keys to encrypt data using your own keys. Figure 2-5 shows the Encryption tab.
FIGURE 2-5 The encryption properties that can be set when creating an Azure storage account using
the portal
NEED MORE REVIEW? CREATING A STORAGE ACCOUNT WITH THE AZURE CLI
Storage firewall
Using the storage firewall, you can limit access to specific IP addresses or an IP address range.
It applies to all storage services endpoints (blobs, tables, queues, and files). For example, by
limiting access to the IP address range of your company, access from other locations will be
blocked. Service endpoints are used to restrict access to specific subnets within an Azure virtual
network.
To configure the storage firewall using the Azure portal, open the storage account blade
and click Networking. Under Public Network Access, select Enabled From Selected Virtual
Networks And IP Addresses to reveal the Firewall and Virtual Networks settings, as shown in
Figure 2-6.
When accessing the storage account via the internet, use the storage firewall to specify the
internet-facing source IP addresses (for example, 32.54.231.0/24, as shown in Figure 2-6) which
will make the storage requests. All internet traffic is denied, except the defined IP addresses
in the storage firewall. You can specify a list of either individual IPv4 addresses or IPv4 CIDR
address ranges. (CIDR notation is explained in Skill 4.1 in Chapter 4, “Configure and manage
virtual networking.”)
The storage firewall includes an option to allow access from trusted Microsoft services. As
an example, these services include Azure Backup, Azure Site Recovery, Azure Networking, and
more. For example, it will allow access to storage for NSG flow logs if Allow Trusted Microsoft
Services To Access This Account is selected. Separately, you can enable Allow Read Access To
Storage Logging From Any Network or Allow Read Access To Storage Metrics From Any Net-
work to allow read-only access to storage metrics and logs.
When creating a storage firewall, you must use public internet IP address space. You cannot
use IPs in the private IP address space. Additionally, you cannot use /32 or /31 as a CIDR range,
you must specify the individual IP addresses for individual or small ranges.
FIGURE 2-7 Configuring a subnet with a service endpoint for Azure Storage
The anonymous access level for a container can be specified during creation, or modified
after it has been created. The supported levels of blob containers are as follows:
■■ Private Only principals with permissions can access the container and its blobs.
Anonymous access is denied.
■■ Blob Only blobs within the container can be accessed anonymously.
■■ Container Blobs and their containers can be accessed anonymously.
You can change the access level through the Azure portal, Azure PowerShell, Azure CLI,
programmatically using the REST API, or by using Azure Storage Explorer. The access level is
configured separately on each blob container.
A shared access signature token (SAS token) is a URI query string parameter that grants
access to containers, blobs, queues, and/or tables. Use a SAS token to grant access to a client or
service that should not have access to the entire contents of the storage account (and there-
fore, should not have access to the storage account keys) but still requires secure authentica-
tion. By distributing a SAS URI to these clients, you can grant them access to a specific resource,
for a specified period of time, and with a specified set of permissions. SAS tokens are com-
monly used to read and write the data to users’ storage accounts. Also, SAS tokens are widely
used to copy blobs or files to another storage account.
When dealing with SAS tokens, you must use only the HTTPS protocol. Because active
SAS tokens provide direct authentication to your storage account, you must use a secure
connection, such as HTTPS, to distribute SAS token URIs.
Once the token is generated, it will be listed along with connection string and SAS URLs, as
shown in Figure 2-11.
FIGURE 2-11 Generated SAS token with connection string and SAS URLs
FIGURE 2-12 Creating a shared access signature using Azure Storage Explorer
Azure Storage Explorer is a free download from Microsoft that enables convenient cloud
storage management from your device. Learn more about Azure Storage Explorer at
https://azure.microsoft.com/en-us/products/storage/storage-explorer/.
You can learn more about the account level SAS at https://learn.microsoft.com/en-us/rest/api/
storageservices/create-account-sas.
You can learn more about the user delegation SAS at https://learn.microsoft.com/en-us/rest/
api/storageservices/create-user-delegation-sas.
It can take up to 30 seconds for a stored access policy to take effect, and users might see an
HTTP 403 when attempting access during that time.
FIGURE 2-13 Creating stored access policies using the Azure portal
Figure 2-14 shows stored access policies being created in Azure Storage Explorer.
FIGURE 2-14 Creating stored access policies using Azure Storage Explorer
To use the created policies, reference them by name when creating a SAS token using
Storage Explorer or when creating a SAS token using PowerShell or the CLI tools.
You can have a maximum of only five access policies on a container, table, queue, or file share.
Each storage account has two access keys. This means you can modify applications to use
the second key instead of the first and then regenerate the first key. This technique is known as
“key rolling” or “key rotation.” You can reset the primary key with no downtime for applications
that directly access storage using an access key.
Storage account access keys can be regenerated using the Azure portal or the command-
line tools. In PowerShell, this is accomplished with the New-AzStorageAccountKey cmdlet; with
Azure CLI, you will use the az storage account keys renew command.
Regenerating a storage account access key will invalidate any SAS tokens that were generated
using that key.
NEED MORE REVIEW? USING HSM-PROTECTED KEYS FOR AZURE KEY VAULT
You can learn more about the bring your own key (BYOK) scenario here:
https://learn.microsoft.com/en-us/azure/key-vault/keys/hsm-protected-keys.
Accessing and unencrypting the stored keys is typically done by a developer, although keys
from Key Vault can also be accessed from ARM templates during deployment.
NEED MORE REVIEW? ACCESSING ENCRYPTED KEYS FROM AZURE KEY VAULT
You can learn more about how developers securely retrieve and use secrets from
Azure Key Vault here: https://learn.microsoft.com/en-us/azure/storage/blobs/
storage-encrypt-decrypt-blobs-key-vault?tabs=roles-azure-portal%2Cpackages-dotnetcli.
A
ACA (Azure Container Apps), 123 budget, 57 Complete mode, 131–132
connecting to, 184–186 creating, 312–313 for creating a network interface,
creating an instance, 178–184 rules, 298, 313–315 127
provisioning a container, 178 target resource, 313 for creating a virtual network,
scaling and sizing, 187–189 viewing, 318–319 126–127
access control, 16 algorithm, spreading, 168 for defining a virtual machine
blob storage, 77–78, 86–88 alias record, 269–270 resource, 129
role-based, 16–19 aligned availability set, 163 deployment, 133–135, 137
scope, 18–19 allocation, public IP address, editing, 133–134
access keys, storage account, 83–84 228–229 elements, 125
access tiers, Azure Blob Storage, App Service, 189–190, 199–200 exporting from a deployment,
69–70, 110–112 backup, 204–205 137–139
accountability, organizational, 55 creating, 193–196 functions, resourceGroup(), 126
ACI (Azure Container Instances), 123 deployment slots, 210–211 Incremental mode, 132
connecting to, 177–178 managed certificates, 200–201 modifying an existing, 131
creating, 174–177 mapping to a custom DNS name, parameters, 136, 137
scaling and sizing, 186–187 196–199 UI, 135
ACR (Azure Container Registry), 168 network settings, 205–206 validation, 135
Access Keys blade, 172 private key certificates, 201–203 variables, syntax, 126
creating an instance from the public key certificate, 203 ASG (application security group),
Azure portal, 170–171 App Service plan 246–247, 251–253
managing, 172 creating, 190–192 assigned group, 5
tiers, 169 provisioning, 190 async blob copy, 100–101
action groups, 316–318 scaling, 192–193 authentication, 84–85, 86–88
activity logs, 304–305 append blob, 66, 107 availability, 161
additive model, 16–17 application, three-tier architecture, set
ADFS (Active Directory Federation 246 storage account replication
Services), 1 Application Insights, configuration, mode, 89–91
administrator role 321–323. See also Azure Monitor, zone, 159–160
permissions, 49–50 insights az deployment group create
subscription, 49 applying, resource tags, 41 command, 142
agents, Log Analytics workspace, 301 architecture, three-tier application, AZ-104 Microsoft Azure
AKS (Azure Kubernetes Service), 123 246 Administrator exam, 358–359
alert/s, 311–312 archive access tier, Azure Blob updates, 358–359
action groups, 316–318 Storage, 69–70 azcopy command, 99–100
analyzing across subscriptions, ARM (Azure Resource Manager) AzNetworkWatcherNextHop
319–321 template, 16, 124 cmdlet, 329
Azure Monitor, 294 for adding a public IP address,
128–129
362
blob/s
363
blob/s, continued
364
GZRS (geographically zone redundant storage)
definition
initiative, 31
A record, 230
records, 268–269
F
policy, 31–32, 33–37 resolution VNet, 275 fault domain, 163, 168
Delete lock, 38 reverse lookup, 265 file share, creating, 102–103
deleting server, 274 files
devices, 8 services, 266 Bicep
Entra ID directories, 29 zone, 263–264 storage, 66
resource groups, 46–48 Docker, registryname.azurecr.io firewall, storage, 74
deny assignment, 19 command, 172 access from trusted Microsoft
dependency, 127, 128 Docker Hub, 168 services, 75
deployment dynamic allocation, public IP address space, 75
ARM template, 133–135, 137 address, 228 configuration, 74
Bicep file, 142 dynamic group/s, 5–6 forced tunneling, 236
exporting a template from, Function App, 316
137–139 functions
Network Watcher, 327
slots, 210–211 E ARM template, 125
resourceGroup(), 126
VM (virtual machine), 143–144 EA (Enterprise Agreement), 58, 59
development editing
G
Application Insights, 321–323 ARM template, 133–134
containers and, 168 groups, 6
Entra ID, 1 Effective Security Rules view, Azure geo-replications, 174
device portal, 253–254 Get-AzNetworkWatcherTopology
associating with Entra ID, 12 encryption cmdlet, 331
deleting, 8 storage account, 95–96 global peering, 222
hybrid Entra join, 14 VM (virtual machine) governance, subscription, 50–51
identity, 12 endpoints graphs, query-based, 310
managed, 12 health probes, 280 group/s, 4. See also ASG (application
management, 7–8 private, 259–262 security group); NSG (network
non-hybrid Entra join, 14 service, 258 security group)
registration, 12–13 Entra Admin Center, 3, 8–9 action, 316–318
diagnostic logs, 304, 305–307 Entra Connect, 1 assigned, 5
directories, Entra ID, 28, 29 Entra Connect Sync, 1 creating, in Azure portal, 4
disabling, VM encryption, 153 Entra External ID, 1 dynamic, 5–6
disks Entra ID, 1 editing, 6
managed, 163 authentication, 84–85, 86–88 management, 6, 18, 33, 50–53
storage, 66 cloud-only users, 3 Microsoft 365, 5
VM (virtual machine), managing, development, 1 placement, 163–164
158–159 Device Settings blade, 12–13 properties, 6–9
DMZ (demilitarized zone), 215–216 directories, 28, 29 RBAC (role-based access
DNS Join, configuration, 12–14 control), 17
alias record, 230 license/s resource, 30, 33
bring your own, 273–274 roles, 18 security, 5
CNAME record, 230 SSPR (self-service password GRS (geographically redundant
custom settings, 272–273, reset), 14–15 storage), 68
274–275 subscription, 48 Guest OS metrics, 295–296
labels, 229–230 tenant, 28 guest users, managing, 10–12
local, 264 Entra ID B2B, 1 GZRS (geographically zone
name resolution, 262, 264–265 external users, managing, 10–12 redundant storage), 68
365
health monitoring, VMSS (Virtual Machine Scale Sets)
H key rolling, 83
KQL (Kusto Query Language),
group, 6–7, 18, 50–53
license, 10
health monitoring, VMSS (Virtual 307–308, 309 plane, 38–39
Machine Scale Sets), 166–167 resource group, 41–42
health probes, Azure Load Balancer, subscription, 48–49
279–280
hierarchy, management group, 51
L VM disk, 158–159
method, validateMoveResources,
hot access tier, Azure Blob Storage, large scale set, 164 44–45
69 LDNS (local DNS), 264 metrics, 294–295, 304. See also data
HSM (hardware security module), 84 legacy storage account types, 67–68 collection
hub-and-spoke topology license, Entra ID Azure Monitor, 293
creating a VNET peering on, management, 10 multidimensional, 296
225–227 purchasing, 10 one-dimensional, 296
VNet, 223 SSPR requirements, 14 populating a chart, 296–298
hybrid Entra join, 14 line chart, 298 properties, 296
hybrid Entra joined devices, 14 Linux, 106 retention period, 295–296
load balancing, 277. See also Azure and visual response times, 299
Load Balancer Microsoft 365, 1, 5
366
records
367
Recovery Services vault
369
VNet (virtual network), continued
370