Restrict AVD Access to On-Premises Users

AZ-140 By islever Editorial Last updated

Short answer

A Create a Conditional Access policy requiring the on-premises named location for Azure Virtual Desktop sign-ins.

Question

You have an on-premises network and an Azure subscription. The subscription contains the following:
✑ 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?
  1. a conditional access policy Correct Answer
  2. an Azure Firewall rule
  3. a network security group (NSG) rule
  4. a user-defined route

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?

An NSG filters packets by source IP, not user identity, and only applies where traffic transits the subnet. It cannot enforce which identities sign in to the host pool, so it does not guarantee that only on-premises users connect.

Can Conditional Access block users who are already on the VPN?

Yes. Conditional Access evaluates the named location derived from the client's source IP, so sessions originating from the on-premises public IP range are allowed while other locations are blocked at sign-in.

Does Azure Firewall help here?

An Azure Firewall rule controls traffic traversing the firewall, but it restricts flows rather than users. Any user with valid credentials could still authenticate to the AVD broker unless an identity control is also applied.

Community Votes

A
67%
B
25%
C
8%

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

  1. bugdad 👍 7
    I think it should be A... AVD is accesable from anywhere
  2. Jakobss 👍 4 Answered A
    To 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.
  3. jeff1988 👍 3 Answered A
    To 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.
  4. Frankmmendoza 👍 3 Answered C
    Based 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.
  5. PXAbstraction 👍 3
    Agreed, should be A. You could theoretically attain the same goal with B, but far less effectively and elegantly.
Show 20 more comments
  1. LeGluten 👍 3 Answered A
    A for sure, https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition
  2. kam247 👍 2
    Correct 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.
  3. AnonymousJhb 👍 2
    A. as per CAP location. https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition
  4. JohnYen 👍 2
    Should be A https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition
  5. AKov77777 👍 2 Answered B
    B? https://learn.microsoft.com/en-us/azure/firewall/protect-azure-virtual-desktop?tabs=azure
  6. picho707 👍 2
    This can be easily done with a single firewall rule.
  7. pappkarcsiii 👍 2 Answered A
    A. a conditional access policy
  8. Luc401 👍 2 Answered A
    Should be A
  9. hawkens 👍 1
    Identify 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
  10. hwoccurrence 👍 1 Answered A
    Conditional 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.
  11. lukiduc9625 👍 1 Answered A
    I 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
  12. picho707 👍 1
    The 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.
  13. DC095 👍 1
    There 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.
  14. Judith1969 👍 1
    B? Becasue there is a "An Azure Firewall instance" and question states "The solution must minimize administrative effort."
  15. Ivanvazovv 👍 1
    How exactly will an NSG control the traffic? Don't forget that the AVD host uses a reverse connect.
  16. Leocan 👍 1 Answered A
    https://learn.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition
  17. choy1977 👍 1
    This must be A.. can't understand why b has been selected!
  18. Ishraj 👍 1 Answered B
    It talks about AVD managed resources. It should be B
  19. Alessandro365 👍 1
    correct, this is the point!! Answer A is correct
  20. ESAJRR 👍 1 Answered B
    B. an Azure Firewall rule

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All AZ-140 Questions

Access 64 questions with complete answers and detailed explanations.

View Full AZ-140 Practice Test →

← Back to AZ-140 Study Guide