Restricting Azure AI Service Access to Virtual Network
You have an Azure subscription that contains an Azure AI Service resource named CSAccount1 and a virtual network named VNet1. CSAaccount1 is connected to VNet1. You need to ensure that only specific resources can access CSAccount1. The solution must meet the following requirements: • Prevent external access to CSAccount1. • Minimize administrative effort. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct answer is worth one point.
Community Votes
76% of anonymous learners picked answer AE. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam traps learners into choosing IAM (Option B) instead of Network Rules (Option E), confusing identity-based access control with network-based perimeter security.
This question tests configuring network isolation for Azure AI services by combining virtual network service endpoints with resource-level network rules.
Learners frequently select Option B (IAM) because it is a common security practice, but IAM controls *who* can access the API keys/endpoint, not *where* the traffic comes from. The requirement to prevent external access requires network-level filtering.
Community Discussion (19 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
To restrict access to an Azure AI Service resource like CSAccount1 so that only specific resources within a VNet can reach it, you must implement a combination of connectivity and filtering. First, enabling a Service Endpoint in VNet1 (Option A) allows traffic from the VNet to route optimally over the Microsoft backbone network, bypassing the public internet. Second, modifying the virtual network settings on the CSAccount1 resource itself (Option E) allows you to configure 'Network Rules' (specifically adding the subnet ID). This creates a firewall-like restriction at the resource level, denying all traffic from networks other than the specified VNet subnets.Why the Other Options Are Wrong
Option B (IAM) manages role assignments (e.g., Cognitive Services OpenAI User) which determines permissions after access is granted; it does not block IP addresses or external connections. Option C (Modify VNet settings) is vague and doesn't specify the mechanism (like Service Endpoints or NSGs) required for this specific service integration. Option D (Create a subnet) is a prerequisite step but does not inherently enforce access restrictions without further configuration.Community Comment Notes
Many users correctly identified AE as the solution, noting that service endpoints provide the secure path while resource-level network settings act as the gatekeeper. Some users debated Option B, arguing that IAM is necessary for least privilege, but the community consensus clarified that IAM does not satisfy the 'prevent external access' requirement, which is strictly a network boundary issue. As one commenter noted, 'IAM controls do not necessarily help if the endpoint and key are compromised,' highlighting the need for network isolation.Official Reference
Exam Strategy
Always distinguish between Identity Management (IAM/RBAC) and Network Security (Firewalls/VNET Rules). If the question asks to 'prevent external access' or 'isolate from the internet', look for Network Rules or Private Links first, not IAM roles.
Frequently Asked Questions
Why is Option B (IAM) incorrect for preventing external access?
IAM controls who has permission to use the API keys, but it does not filter the source IP address or network. External attackers with valid keys could still access the service.
What is the difference between Service Endpoints and Private Link here?
Service Endpoints optimize routing and add context to traffic. For this specific question, the 'modify virtual network settings' on the resource side refers to adding subnet IDs to the allowed networks list, which works with Service Endpoints.