AZ-104 Implement and Manage Storage Practice Question
A team has Windows VMs in a subnet that need to access an Azure Storage account. The storage account should remain reachable through its public endpoint, but only traffic from that one subnet should be allowed. Which configuration best meets the requirement?
⚠ Common exam trap
A common mix-up: candidates confuse service endpoints with private endpoints, thinking that a private endpoint is required to restrict access to a specific subnet, but service endpoints with firewall rules achieve the same goal while keeping the public endpoint accessible.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Enable a service endpoint on the subnet and add a virtual network rule for that subnet on the storage account firewall.
A service endpoint extends the virtual network private address space to the storage account, allowing traffic from the specified subnet to reach the storage account via the Azure backbone while keeping the public endpoint accessible. By adding a virtual network rule on the storage account firewall, you restrict access to only traffic originating from that subnet, meeting the requirement of allowing only that subnet through the public endpoint.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create a private endpoint and disable public network access on the storage account.
Why it's wrong here
A private endpoint places the storage account on a private IP inside your VNet, so traffic doesn't traverse the public endpoint or the storage account firewall rules for that endpoint. Disabling public network access then makes the account reachable only via the private endpoint, which is a fundamentally different access model - it neither keeps the public endpoint available nor limits usage through a virtual network rule on the subnet, so it doesn't match the requirement.
When this WOULD be correct
When the requirement is to completely isolate the storage account from the public internet and allow access only from a specific virtual network, such as for a highly sensitive application that must not be exposed to any public endpoint.
- ✓
Enable a service endpoint on the subnet and add a virtual network rule for that subnet on the storage account firewall.
Why this is correct
A service endpoint lets resources in the subnet access the storage account through the service's public endpoint while presenting the subnet's Azure identity to the firewall. By adding a virtual network rule for that subnet, the storage account allows traffic from that subnet and blocks traffic from others. This satisfies the requirement to keep the public endpoint and restrict access to a single subnet.
- ✗
Place the subnet behind a NAT gateway and use a shared public IP.
Why it's wrong here
A NAT gateway changes the outbound source IP of VMs to a shared public IP, but the storage account's firewall does not automatically recognize that IP as belonging to your subnet; you would have to add it as an individual rule. Adding a service endpoint and virtual network rule are needed to authorize a specific subnet; a NAT IP rule would grant access to anything behind that public IP, not just the subnet, and it doesn't address the public endpoint retention requirement at all.
When this WOULD be correct
If the requirement were to allow VMs in a subnet to access the internet (e.g., for updates) while hiding their private IPs behind a single public IP, a NAT gateway would be the correct solution.
- ✗
Add a VPN gateway and route storage traffic through the branch office.
Why it's wrong here
A VPN gateway is an IPSec tunnel designed for site-to-site hybrid connectivity between an on-premises network and Azure, not for governing which VNet subnets can reach a PaaS service. Even with a VPN gateway in place, the storage account firewall still evaluates the incoming source IP, and the gateway doesn't inject any subnet identity or allow-listed rule, so it can't restrict access to the intended subnet or satisfy the public-endpoint requirement.
When this WOULD be correct
A question requiring secure, encrypted connectivity from an on-premises network to Azure resources, such as 'A company needs to connect its branch office to Azure VMs over the internet with encrypted traffic.' In that case, a VPN gateway would be correct.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓Enable a service endpoint on the subnet and add a virtual network rule for that subnet on the storage account firewall.Correct answer▾
Why this is correct
A service endpoint lets resources in the subnet access the storage account through the service's public endpoint while presenting the subnet's Azure identity to the firewall. By adding a virtual network rule for that subnet, the storage account allows traffic from that subnet and blocks traffic from others. This satisfies the requirement to keep the public endpoint and restrict access to a single subnet.
✗Create a private endpoint and disable public network access on the storage account.Wrong answer — click to see why▾
Why this is wrong here
The requirement states the storage account must remain reachable through its public endpoint, but option A disables public network access, which violates that condition.
★ When this WOULD be the correct answer
When the requirement is to completely isolate the storage account from the public internet and allow access only from a specific virtual network, such as for a highly sensitive application that must not be exposed to any public endpoint.
Why candidates choose this
Candidates may think that private endpoints are the standard for secure access and overlook the explicit requirement to keep the public endpoint enabled.
✗Place the subnet behind a NAT gateway and use a shared public IP.Wrong answer — click to see why▾
Why this is wrong here
A NAT gateway provides outbound internet access but does not restrict inbound access to the storage account to a specific subnet; it only changes the source IP for outbound traffic, so the storage account firewall cannot filter by subnet.
★ When this WOULD be the correct answer
If the requirement were to allow VMs in a subnet to access the internet (e.g., for updates) while hiding their private IPs behind a single public IP, a NAT gateway would be the correct solution.
Why candidates choose this
Candidates may confuse NAT gateway with service endpoints, thinking that a shared public IP can be used in a storage firewall rule to restrict access, but storage firewalls cannot filter by NAT gateway public IPs.
✗Add a VPN gateway and route storage traffic through the branch office.Wrong answer — click to see why▾
Why this is wrong here
A VPN gateway routes traffic over an encrypted tunnel to a branch office, not directly to Azure Storage. It does not restrict storage access to a specific subnet's traffic; instead, it adds unnecessary complexity and latency.
★ When this WOULD be the correct answer
A question requiring secure, encrypted connectivity from an on-premises network to Azure resources, such as 'A company needs to connect its branch office to Azure VMs over the internet with encrypted traffic.' In that case, a VPN gateway would be correct.
Why candidates choose this
Candidates may think a VPN gateway provides a secure, private connection to Azure Storage, confusing site-to-site VPN with subnet-level access control, and overlook that the requirement is about restricting access from a specific subnet, not encrypting traffic.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Visual reference
Go deeper
Related to this question
Learn chapter
Managed Identities for Azure Resources
Key term
Firewall
A firewall is a network security system that monitors and controls incoming and outgoing traffic based on predetermined security rules to protect trusted internal networks from untrusted external networks.
Key term
Virtual network
A virtual network is a software-based network that connects computers, servers, and devices over the internet or within a cloud environment, simulating a physical network without requiring dedicated hardware.
About these practice questions
One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.