You have an Azure subscription that contains the resources shown in the following table.

Subshell contains Three virtual machines that host an app named App1. App1 is accessed by using the SFTP protocol.
From NSG1. you configure an inbound security rule named Rule2 that allows inbound SFTP connections to ASG1.
You need to ensure that the inbound SFTP connections are managed by using ASG1. The solution must minimize administrative effort.
What should you do?
Show answerHide answer
Correct answer: B
From each virtual machine, associate the network interface to ASG1
Explanation
Explanation:This question tests the implementation of Application Security Groups (ASGs). ASGs are logical groupings of virtual machine NICs that allow NSG rules to target applications rather than specific IPs. For an NSG rule targeting an ASG to be effective, the NICs of the relevant VMs must be associated with that ASG.
Correct Option:
B. From each virtual machine, associate the network interface to ASG1.
This is the direct and necessary action. ASGs function by being attached to the network interfaces (NICs) of virtual machines. Since Rule2 in NSG1 is already configured to allow SFTP traffic to ASG1, traffic will only be permitted to VMs whose NICs are members of ASG1. This approach centralizes management; updating the ASG membership automatically applies the NSG rule without modifying the rule itself.
Incorrect Option:
A. From NSG1, modify the priority of Rule2.
Changing the rule's priority affects its evaluation order relative to other rules but does nothing to link the VMs to the ASG. The rule already targets ASG1, but if no VM NICs are associated with it, the rule has no effect.
C. From Subnet1, create a subnet delegation.
Subnet delegation is used to grant specific Azure services (like Azure NetApp Files or Azure Dedicated HSM) permission to create service-specific resources in the subnet. It has no relation to NSG rules or ASG membership.
D. From ASG1, modify the role assignments.
Role assignments in Azure control access management (RBAC) for creating, modifying, or deleting the ASG resource itself. They do not control which NICs are members of the ASG or how traffic is filtered.
Reference:
Microsoft Learn - Application security groups. The documentation states: "You can define your application's structure by grouping VMs and defining network security policies based on those groups. You can reuse your security policy at scale without manual maintenance of explicit IP addresses... An application security group is associated with a network interface."















