Restrict AVD Access to On-Premises Users
Short answer
A Create a Conditional Access policy requiring the on-premises named location for Azure Virtual Desktop sign-ins.
Question
✑ A virtual network
✑ An Azure Firewall instance
✑ An Azure Virtual Desktop host pool
The virtual network connects to the on-premises network by using a site-to-site VPN.
You need to ensure that only users from the on-premises network can connect to the Azure Virtual Desktop managed resources in the host pool. The solution
must minimize administrative effort.
What should you configure?
Key Takeaways
The question tests identity-based versus network-based access control; the trap is choosing the Azure Firewall or NSG because it appears in the scenario, when those filter traffic rather than users.
This AZ-140 question tests how to limit Azure Virtual Desktop access to on-premises users while minimizing effort. The correct control is a Conditional Access policy (A) keyed to the on-premises network location, not a firewall, NSG or route rule.
Common mistake: Option C, an NSG rule allowing only the VPN address space, sounds like a simple network fix — but NSGs filter packets, not identities, and cannot enforce which users may sign in to the host pool.
Expert Analysis
What the question actually constrains. The scenario gives a virtual network joined to on-premises by site-to-site VPN, an Azure Firewall, and an AVD host pool. The goal is that only on-premises users reach the host pool's managed resources, with minimal administrative effort. The trap is to pick the object the question happens to mention (Azure Firewall in option B, an NSG in option C, or a route in option D) rather than the control that actually gates user access.
Why the network-layer answers fail. Option B, an Azure Firewall rule, controls traffic flowing through the firewall's subnet — it would need to know the host pool's management endpoints and would restrict traffic, not identity, so any user anywhere could still authenticate. Option C, an NSG rule, is the most tempting: it looks like a straightforward "allow only the VPN address space" fix on the session-host subnet. But an NSG filters packets, not people — it cannot tell an on-premises user from an external one once traffic is permitted, and it does nothing about users who reach the broker through other paths. Option D, a user-defined route, only steers traffic to an appliance and performs no access control at all.
Why option A is correct. A Conditional Access policy in Microsoft Entra ID can define the on-premises public IP range (or a named location) as a required condition, so only identities originating from that network can sign in to the AVD feed. This is a single policy in one place, uses an identity control that AVD's managed resources already honour, and needs no changes to routing, firewall rule collections, or subnet ACLs — which is exactly what "minimize administrative effort" points to. It matches the comment arguing that Conditional Access "is considered the simplest, most centralized way to limit Azure Virtual Desktop logons to on-premises only." The correct choice is A.
Exam Strategy
On AZ-140, when a question says only users from a specific location may connect and asks to minimize effort, look for an identity control (Conditional Access) rather than a packet filter — NSGs, firewalls and routes cannot distinguish users. Always ask whether the option constrains people or traffic; if the question names several network appliances, treat them as distractors unless the requirement is explicitly about traffic flows or egress.
Frequently Asked Questions
Why not use an NSG rule to allow only the on-premises VPN address space?
Can Conditional Access block users who are already on the VPN?
Does Azure Firewall help here?
Community Votes
67% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 25 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 25
-
bugdad 👍 7I think it should be A... AVD is accesable from anywhere
-
Jakobss 👍 4 Answered ATo ensure that only users from the on-premises network can connect to the Azure Virtual Desktop managed resources in a host pool, you can use Azure Firewall to restrict access to the Azure Virtual Desktop resources. Azure Firewall allows you to control inbound and outbound network traffic to and from your Azure resources, including Azure Virtual Desktop resources.
-
jeff1988 👍 3 Answered ATo ensure that only users from the on-premises network can connect to the Azure Virtual Desktop managed resources in the host pool, while minimizing administrative effort, you should configure A. a conditional access policy. Conditional access policies in Azure Active Directory allow you to enforce access controls based on specific conditions, such as the network location. By setting up a conditional access policy, you can restrict access to the Azure Virtual Desktop resources to only those users who are connecting from the on-premises network.
-
Frankmmendoza 👍 3 Answered CBased on the requirement to restrict access to AVD resources to users from the on-premises network over a site-to-site VPN connection, configuring a network security group (NSG) rule is the correct and optimal solution. It effectively meets the security requirement while minimizing administrative effort, aligning with best practices for network security in Azure environments.
-
PXAbstraction 👍 3Agreed, should be A. You could theoretically attain the same goal with B, but far less effectively and elegantly.
Show 20 more comments
-
LeGluten 👍 3 Answered AA for sure, https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition
-
kam247 👍 2Correct answer is B. They have a site to site VPN configured, first point. Therefore we need to restrict access via private IP range. Although you can restrict access via public IP using network locations in CA, you cannot do this via a private IP range which would be used since they have a site to site vpn. The only option is to use Azure FW which is already configured.
-
AnonymousJhb 👍 2A. as per CAP location. https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition
-
JohnYen 👍 2Should be A https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition
-
AKov77777 👍 2 Answered BB? https://learn.microsoft.com/en-us/azure/firewall/protect-azure-virtual-desktop?tabs=azure
-
picho707 👍 2This can be easily done with a single firewall rule.
-
pappkarcsiii 👍 2 Answered AA. a conditional access policy
-
Luc401 👍 2 Answered AShould be A
-
hawkens 👍 1Identify the On-Premises Network IP Range Configure Azure Firewall Network Rules Ensure VPN Connectivity Step 1: Identify the On-Premises Network IP Range Step 2: Configure Azure Firewall Network Rules Navigate to the Azure Firewall instance in the Azure portal Go to the "Rules" tab and select "Network rule collection" Set the priority (lower numbers have higher priority) Choose "Allow" for the action In the rule collection, add a new rule Set the source address range to the CIDR block of your on-premises network Set the destination address range to the IP addresses of the AVD host pool or the virtual network subnet where the AVD resources reside Set the destination port ranges to the appropriate ports used by AVD (e.g., 3389 for RDP) Set the protocol to "Any" or specify the protocol used by AVD Save the rule collection and ensure it is active. Ensure that the site-to-site VPN connection between your on-premises network and the Azure virtual network is properly configured Check that routing is correctly set up
-
hwoccurrence 👍 1 Answered AConditional Access is considered the simplest, most centralized way to limit Azure Virtual Desktop logons to “on‐premises only.” By defining your on‐premises public IP range as a Named Location in Entra (Azure AD) and creating a CA policy that requires that IP location, you effectively block connections from outside your on‐prem network. While firewall or NSG rules could also be used, they typically require more manual IP/subnet management (and might not easily differentiate “user traffic” from on‐prem vs. “admin traffic” from the internet). Conditional Access is designed exactly for “only let these users sign in from these networks” with minimal overhead.
-
lukiduc9625 👍 1 Answered AI think, that from given options only CA policy can work. To use mentioned site-to-site VPN connection it should be configured Private Endpoints for AVD - but there is not such info in question text nor such possibilities in answers
-
picho707 👍 1The key piece of information here is "minimize administrative effort". I do think this is easier to do with CA policy as it gives the administrator more control of the VDI environment.
-
DC095 👍 1There is no mention of RDP shortpath for managed networks being configured. Traffic bound for Azure Virtual desktop does not traverse a site to site by default.
-
Judith1969 👍 1B? Becasue there is a "An Azure Firewall instance" and question states "The solution must minimize administrative effort."
-
Ivanvazovv 👍 1How exactly will an NSG control the traffic? Don't forget that the AVD host uses a reverse connect.
-
Leocan 👍 1 Answered Ahttps://learn.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition
-
choy1977 👍 1This must be A.. can't understand why b has been selected!
-
Ishraj 👍 1 Answered BIt talks about AVD managed resources. It should be B
-
Alessandro365 👍 1correct, this is the point!! Answer A is correct
-
ESAJRR 👍 1 Answered BB. an Azure Firewall rule
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AZ-140 Questions
Access 64 questions with complete answers and detailed explanations.
View Full AZ-140 Practice Test →