AZ-104
Free AZ-104 practice questions
10 questions from our AZ-104 practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.
Question 1 of 10, Manage Azure identities and governance
A partner company's consultants need access to a single resource group in your subscription. They must sign in with their own organizational accounts, and your IT team must not manage their passwords. What should you do?
- ASynchronize the partner's on-premises Active Directory accounts into your tenant with Microsoft Entra Connect
- BCreate member accounts for the consultants in your tenant and enable self-service password reset for them
- CCreate a shared service principal with a client secret and give the secret to the partner company's lead
- DInvite the consultants as B2B guest users and assign them an Azure RBAC role on the resource group Correct answer
Answer and explanation: Microsoft Entra B2B collaboration lets external users authenticate with their home identity while you grant them RBAC roles on your resources, so you never manage their credentials. Creating member accounts makes your team responsible for those identities and passwords. A shared service principal secret is not tied to individual people and cannot be audited per user. Synchronizing another organization's directory into your tenant is not supported for this purpose and would also make you own the accounts.
Question 2 of 10, Manage Azure identities and governance
Your company has 12 subscriptions under a Microsoft Customer Agreement. Three of them are the only subscriptions in a management group named MG-Retail. Finance needs one budget that alerts when the combined monthly cost of those three subscriptions reaches 80% of 50,000 USD. Which scope should you use for the budget?
- AA resource group in one of the three subscriptions
- BThe MG-Retail management group Correct answer
- CThe billing account, without filters
- DEach of the three subscriptions, with a budget of 16,667 USD
Answer and explanation: A budget on the MG-Retail management group evaluates the combined cost of every subscription in it, and those are exactly the three subscriptions, so one 50,000 USD budget with an 80% alert threshold does the job. Three separate 16,667 USD budgets alert on each subscription's own cost, so one subscription can trigger an alert while the combined total is still low, or the total can pass 40,000 USD without any single alert. A resource group budget sees only that resource group. A billing account budget without filters counts all 12 subscriptions.
Question 3 of 10, Manage Azure identities and governance
Your organization uses Microsoft Entra Connect to synchronize on-premises Active Directory users. Users who reset their passwords through SSPR in the cloud report that their on-premises domain password does not change. What must be enabled?
- AStaged rollout of cloud authentication for the synchronized users' security group
- BPassword writeback in Entra Connect and the SSPR on-premises integration setting Correct answer
- CPassword hash synchronization with a shorter synchronization interval of 2 minutes
- DSeamless single sign-on together with pass-through authentication agents on-premises
Answer and explanation: Password writeback, enabled in Microsoft Entra Connect (or cloud sync) and in the SSPR on-premises integration settings, writes cloud password changes back to Active Directory. Password hash synchronization flows hashes from on-premises to the cloud only, so changing its interval does not help. Seamless SSO and pass-through authentication affect sign-in, not where a reset password is stored. Staged rollout moves users to cloud authentication but does not write passwords back.
Question 4 of 10, Implement and manage storage. Choose 2.
You configure a lifecycle management policy that should delete blob versions older than 90 days and move current blobs not modified for 30 days to the Cool tier. Which two rule actions should the policy include? (Choose two.)
- AA baseBlob action with delete after daysAfterLastAccessTimeGreaterThan 90
- BA baseBlob action with tierToCool after daysAfterModificationGreaterThan 30 Correct answer
- CA version action with enableAutoTierToHotFromCool after 90 days
- DA version action with delete after daysAfterCreationGreaterThan 90 Correct answer
- EA snapshot action with tierToArchive after 30 days
Answer and explanation: Lifecycle rules use the version action block for previous versions, with delete based on days after creation, and the baseBlob block for current blobs, with tierToCool based on days after modification. A snapshot action targets snapshots, not current blobs, and archives rather than cools. Deleting base blobs by last access deletes current data rather than old versions. enableAutoTierToHotFromCool applies to base blobs that are read, not to deleting versions.
Question 5 of 10, Implement and manage storage
A company needs its storage account data to survive the loss of an entire Azure region and the failure of a single datacenter (availability zone) in the primary region. It does not need read access to the secondary region during normal operation. Which redundancy option meets the requirements at the lowest cost?
- AGeo-redundant storage (GRS)
- BZone-redundant storage (ZRS)
- CRead-access geo-zone-redundant storage (RA-GZRS)
- DGeo-zone-redundant storage (GZRS) Correct answer
Answer and explanation: GZRS copies data synchronously across three availability zones in the primary region and asynchronously to the paired secondary region, so it survives both a zone (datacenter) failure and a regional outage. GRS keeps its three primary copies with LRS, inside one datacenter, so a datacenter failure takes the primary copy offline. ZRS protects against a zone failure but never leaves the primary region. RA-GZRS gives the same protection plus read access to the secondary region, which the scenario does not need, so it costs more.
Question 6 of 10, Deploy and manage Azure compute resources
A Linux VM must have all data cached on the host and temporary disks encrypted end to end with platform-managed keys, without using DM-Crypt inside the guest. What should you enable?
- AAzure Disk Encryption with Key Vault
- BEncryption at host for the VM Correct answer
- CConfidential disk encryption on Gen1
- DA disk encryption set with CMK only
Answer and explanation: Encryption at host encrypts temp disks and OS/data disk caches on the VM host, with data flowing encrypted to the Storage service, and does not use guest-level encryption. Azure Disk Encryption uses DM-Crypt inside Linux guests, which is not wanted. A disk encryption set with customer-managed keys encrypts disks at rest in storage but does not cover the temp disk and host caches by itself. Confidential disk encryption requires confidential VM sizes, which are Generation 2.
Question 7 of 10, Deploy and manage Azure compute resources
An ARM template deploys a VM, and the parameter file must pass the local administrator password, which is stored as a secret in Azure Key Vault. Deployment fails with an error that the key vault cannot be accessed. The deploying user has get permissions on secrets. What must you change?
- AEnable the vault's access for Azure Disk Encryption for volume encryption
- BEnable the vault's access for Azure Resource Manager for template deployment Correct answer
- CMove the key vault into the same resource group as the virtual machine
- DAssign the Key Vault Crypto User role to the deploying user on the key vault resource
Answer and explanation: To reference a Key Vault secret from a parameter file, the vault must have the enabledForTemplateDeployment setting turned on, which lets Resource Manager retrieve the secret during deployment. The disk encryption setting is for Azure Disk Encryption, not template deployment. Crypto User concerns keys, not secrets, and the user already can read secrets. The vault can be in a different resource group or subscription in the same tenant.
Question 8 of 10, Implement and manage virtual networking. Choose 2.
You must allow inbound HTTPS from the internet to web VMs in a subnet and allow those VMs to reach Azure SQL Database in the same region, while blocking all other outbound internet traffic. Which two NSG rules should you add? (Choose two.)
- AInbound allow TCP 443 from Internet to the web VMs Correct answer
- BOutbound allow all traffic to the Internet service tag at priority 100
- CInbound deny TCP 443 from the VirtualNetwork service tag
- DOutbound allow TCP 1433 to the Sql.<region> service tag, above a deny to Internet Correct answer
- EInbound allow all traffic from the AzureCloud service tag
Answer and explanation: An inbound allow for TCP 443 from the Internet tag permits HTTPS to the web VMs, and an outbound allow to the regional Sql service tag with higher priority than an outbound deny to Internet permits database traffic while blocking other internet destinations. Allowing all outbound internet traffic violates the requirement. Allowing everything from AzureCloud opens the VMs to all Azure customers. Denying 443 from VirtualNetwork does not address either requirement.
Question 9 of 10, Implement and manage virtual networking
Administrators must connect to Windows and Linux VMs over RDP and SSH from the Azure portal without assigning public IP addresses to the VMs and without exposing RDP or SSH ports to the internet. What should you deploy?
- AA NAT gateway associated with the VM subnets
- BAzure Bastion in a subnet named AzureBastionSubnet Correct answer
- CA point-to-site VPN on the existing virtual network gateway
- DA public load balancer with inbound NAT rules
Answer and explanation: Azure Bastion provides browser-based RDP and SSH over TLS from the portal, and it must be deployed into a dedicated subnet named AzureBastionSubnet; VMs need no public IPs. A NAT gateway only handles outbound connectivity. Inbound NAT rules on a public load balancer expose RDP and SSH ports to the internet. A point-to-site VPN avoids public ports but requires client configuration and does not provide portal-based connectivity.
Question 10 of 10, Monitor and maintain Azure resources
An alert must fire when any VM in a subscription is deallocated by a user. Which alert type should you create?
- ASmart detection alert from Application Insights
- BActivity log alert on the deallocate operation Correct answer
- CLog search alert on the Heartbeat table
- DMetric alert on the Percentage CPU metric
Answer and explanation: Deallocating a VM is a control-plane operation recorded in the activity log, so an activity log alert on Microsoft.Compute/virtualMachines/deallocate/action matches it. A CPU metric alert reacts to performance and cannot tell a deallocation from low load. A missing heartbeat could also be caused by a crash or network issue and does not identify the user action. Smart detection analyzes application telemetry.