Free AZ-104 practice test
20 original questions written by our editors against the official Microsoft exam domains. They are not real exam questions. Pick an answer to see why it is right or wrong.
-
Question 1 of 20Manage Azure identities and governance
A junior engineer must be able to start, stop and resize virtual machines in the resource group RG-Web, but must not manage virtual networks, storage accounts or access for anything else in the subscription. What is the best role assignment?
Show answer
Answer: D. Virtual Machine Contributor lets the user manage VMs but not the virtual networks or storage accounts they connect to, and scoping it to RG-Web limits it to that group, which follows least privilege. Owner and Contributor at subscription scope grant far too much, and Reader cannot start or resize anything.
-
Question 2 of 20Manage Azure identities and governance
A consultant from a partner company needs to sign in with her own company account to access a few Azure resources in your tenant. You do not want to manage a password for her. What should you do in Microsoft Entra ID?
Show answer
Answer: C. Inviting an external user (B2B collaboration) creates a guest account that signs in with her home organization's identity, so no password is managed in your tenant. A new member account means managing her credentials, syncing on-premises groups is unrelated, and sharing service principal credentials breaks accountability.
-
Question 3 of 20Manage Azure identities and governance
The production resource group contains a critical SQL server. Even subscription owners should be prevented from deleting resources in it by accident, while still being able to change their settings. What should you configure?
Show answer
Answer: D. A CanNotDelete lock lets authorized users read and modify resources but blocks deletion, and locks apply to all users, including Owners. A ReadOnly lock would also block configuration changes. An Audit policy only reports, and removing Owner rights is drastic and does not stop other roles from deleting.
-
Question 4 of 20Manage Azure identities and governance
Every resource group has a CostCenter tag. Finance wants all resources to carry the same CostCenter tag as their resource group, including the hundreds of resources that already exist. What should you do?
Show answer
Answer: A. The built-in inherit-a-tag policy uses the Modify effect to add the resource group's tag to resources, and a remediation task applies it to resources that existed before the assignment. Deny only blocks new non-compliant deployments and fixes nothing. Locks do not set tags, and subscription tags are not inherited automatically.
-
Question 5 of 20Manage Azure identities and governance
Your company has 15 subscriptions and wants one Azure Policy that restricts allowed regions to apply to all of them, including subscriptions created next year. Where should you assign the policy?
Show answer
Answer: C. Policies assigned at a management group are inherited by every subscription and resource beneath it, including subscriptions added later. Assigning per subscription or per resource group works but is repetitive and easy to miss. Entra directory roles control identity administration, not Azure Policy scope.
-
Question 6 of 20Implement and manage storage
An external auditor needs read access to one blob container for two weeks. You must be able to revoke the access early without rotating the storage account keys. What should you give the auditor?
Show answer
Answer: D. A service SAS tied to a stored access policy can be revoked by changing or deleting the policy, without touching the account keys. An ad hoc SAS can only be revoked early by rotating the key that signed it, and an access key gives full control of the account. Public access exposes the data to anyone.
-
Question 7 of 20Implement and manage storage
An application must keep running reads from storage even if the primary Azure region has an outage, without waiting for a failover. Which redundancy option meets this requirement?
Show answer
Answer: A. RA-GRS replicates data to a secondary region and gives read access to it at any time, so reads continue during a regional outage. GRS also replicates to the secondary region, but the copy is readable only after a failover. LRS and ZRS keep data within one region.
-
Question 8 of 20Implement and manage storage
Log files in a blob container are rarely read after 30 days and can be deleted after one year. You want this handled automatically for the lowest cost. What should you configure?
Show answer
Answer: D. Lifecycle management rules move blobs between access tiers and delete them based on age, which lowers cost without manual work. Versioning keeps old copies and increases storage, object replication duplicates data elsewhere, and a stored access policy controls SAS permissions, not data retention.
-
Question 9 of 20Implement and manage storage
A user deleted an important blob yesterday. The storage account had blob soft delete enabled with a 14-day retention period at the time. What can you do?
Show answer
Answer: B. With blob soft delete, deleted blobs are kept for the configured retention period and can be restored. The activity log records management operations, not blob data, and a geo-failover replicates deletions as well, so it would not bring the blob back.
-
Question 10 of 20Deploy and manage Azure compute resources
A two-VM web tier must stay available if an entire datacenter in the region fails. The region supports availability zones. How should you deploy the VMs?
Show answer
Answer: C. Availability zones are physically separate locations within a region, so spreading VMs across zones protects against the loss of a datacenter. An availability set spreads VMs across fault and update domains within one datacenter. A bigger single VM or a proximity placement group puts everything closer together, not further apart.
-
Question 11 of 20Deploy and manage Azure compute resources
You try to resize a running VM to a new size, but the size does not appear in the list of available sizes for the VM. The size is offered in the region. What should you try first?
Show answer
Answer: A. If the current hardware cluster does not support the new size, deallocating the VM lets Azure place it on hardware that does, after which the size becomes available. Deleting and redeploying is unnecessary, and moving resource groups or adding disks does not change which sizes the host supports.
-
Question 12 of 20Deploy and manage Azure compute resources
A web application runs on identical VMs. Traffic doubles every weekday morning and falls at night. You want Azure to add and remove VMs automatically based on average CPU. What should you use?
Show answer
Answer: A. Virtual Machine Scale Sets manage a group of identical VMs and can scale out and in automatically with autoscale rules on metrics such as CPU. Availability sets improve resilience but do not scale, Site Recovery is for disaster recovery, and a larger VM size is vertical scaling that does not respond to demand.
-
Question 13 of 20Deploy and manage Azure compute resources
Developers want to deploy new versions of an App Service web app to a staging slot and then swap it into production. The app runs in a Basic tier App Service plan and the slot option is unavailable. What should you do?
Show answer
Answer: B. Deployment slots are a feature of the Standard tier and above, so the plan must be scaled up. Scaling out adds instances but does not change features, and Always On and custom domains are unrelated to slots.
-
Question 14 of 20Deploy and manage Azure compute resources
Your team has an existing ARM template, main.json, and wants to maintain it in Bicep from now on. What is the quickest way to get a Bicep file to start from?
Show answer
Answer: A. The Bicep CLI's decompile command converts ARM template JSON into a Bicep file, which you can then clean up. The build command goes the other way, compiling Bicep into ARM JSON, and renaming the file does not change the syntax. What-if previews the effect of a deployment and does not convert anything.
-
Question 15 of 20Implement and manage virtual networking
VNet-Hub is peered with VNet-A and with VNet-B. VMs in VNet-A cannot reach VMs in VNet-B, although both can reach VNet-Hub. No network virtual appliance or gateway is in use. What is the simplest fix?
Show answer
Answer: D. Virtual network peering is not transitive, so traffic does not pass through VNet-Hub on its own. A direct peering between VNet-A and VNet-B is the simplest fix; routing through the hub would need an appliance or gateway with user-defined routes. NSG rules and address changes do not create a path.
-
Question 16 of 20Implement and manage virtual networking
An NSG on a subnet has an inbound rule at priority 200 that allows TCP 3389 from any source, and an inbound rule at priority 100 that denies all traffic from the internet. What happens to an RDP connection from the internet?
Show answer
Answer: D. NSG rules are processed in priority order, lowest number first, and processing stops at the first match. The priority 100 deny rule matches first, so the connection is blocked. Allow rules have no special precedence, and port specificity and creation order do not matter.
-
Question 17 of 20Implement and manage virtual networking
A storage account must be reachable only through a private IP address from a virtual network and from the on-premises network connected by VPN, with public network access disabled. What should you configure?
Show answer
Answer: B. A private endpoint gives the storage account a private IP address in the virtual network, which on-premises clients can reach over the VPN, and public access can then be disabled. A service endpoint keeps the public endpoint and routes VNet traffic over the Azure backbone, but it does not provide a private IP for on-premises clients. Bastion is for VM sign-in only.
-
Question 18 of 20Implement and manage virtual networking
Administrators must connect to Windows VMs over RDP from the Azure portal. The VMs must not have public IP addresses. What should you deploy?
Show answer
Answer: D. Azure Bastion provides RDP and SSH from the portal over TLS without public IPs on the VMs, and it requires a dedicated subnet named AzureBastionSubnet. A public load balancer would expose RDP to the internet, a NAT gateway handles outbound traffic only, and service endpoints are for PaaS services.
-
Question 19 of 20Monitor and maintain Azure resources
The operations team wants an email and an SMS whenever average CPU on a production VM stays above 85% for 10 minutes. What should you create in Azure Monitor?
Show answer
Answer: C. A metric alert rule evaluates the CPU condition, and the action group defines who is notified and how, such as email and SMS. Diagnostic settings only route data, Advisor offers recommendations rather than real-time alerts, and locks protect resources from change.
-
Question 20 of 20Monitor and maintain Azure resources
You create a Recovery Services vault in West Europe to back up VMs that run in North Europe, but the VMs do not appear when you configure backup. What should you do?
Show answer
Answer: B. For Azure VM backup the vault must be in the same region as the VMs, so a vault in North Europe is needed. Soft delete and storage redundancy settings do not change which VMs can be protected, and moving resource groups does not change the region.
| Exam domain | Correct |
|---|