Courseiva
Implement natural language processing solutionshardMultiple ChoiceObjective-mapped

Why Does Azure Language Service Return 403 Forbidden?

Exhibit

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.CognitiveServices/accounts",
      "apiVersion": "2022-12-01",
      "name": "myLanguageService",
      "location": "[resourceGroup().location]",
      "sku": {
        "name": "S0"
      },
      "kind": "TextAnalytics",
      "properties": {
        "customSubDomainName": "mylanguageservice",
        "networkAcls": {
          "defaultAction": "Deny",
          "virtualNetworkRules": [],
          "ipRules": []
        }
      }
    }
  ]
}

Refer to the exhibit. You deploy this ARM template to create an Azure AI Language Service resource. After deployment, you try to call the Language Service API from your application but receive a 403 Forbidden error. What is the most likely cause?

Quick Answer

The answer is the network ACLs blocking all traffic because no IP rules are defined. This is correct because the ARM template sets the `defaultAction` to `Deny` while leaving the IP rules array empty, which means the Language Service endpoint rejects every request by default, returning a 403 Forbidden error regardless of the caller’s identity or authentication. On the Microsoft Azure AI Engineer Associate AI-102 exam, this scenario tests your understanding of how network security configurations override other settings—many candidates mistakenly blame the SKU, subdomain, or resource kind, but the core concept is that a deny-all ACL takes precedence. A common trap is assuming that a valid API key or managed identity bypasses network restrictions; in reality, network ACLs are evaluated before authentication. Memory tip: “No IP rules + Deny default = 403 every call.”

⚠ Common exam trap

It's easy for candidates to assume a 403 error is always due to authentication issues (e.g., missing API key), but in this context, the error is caused by network ACLs blocking traffic, which is a common misdirection in AI-102 questions about ARM template deployments.

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

The network ACLs block all traffic because no IP rules are defined

The ARM template in the exhibit does not include any IP rules in the network ACLs section, which means the default behavior for Azure AI Language Service is to deny all traffic when network ACLs are explicitly configured. Even though the resource is deployed successfully, the absence of allowed IP ranges or a virtual network rule causes the service to block all API calls, resulting in a 403 Forbidden error.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The SKU S0 does not support API calls from applications

    Why it's wrong here

    S0 supports API calls.

  • The resource kind is set incorrectly for Language Service

    Why it's wrong here

    TextAnalytics is correct for Language Service.

  • The network ACLs block all traffic because no IP rules are defined

    Why this is correct

    Deny default with no allowed IPs blocks all calls.

  • The custom subdomain name is invalid

    Why it's wrong here

    The name is valid.

About these practice questions

This AI-102 question is part of Courseiva's 945-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on AI-102

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You deploy an Azure AI Services resource using the ARM template shown in the exhibit. You need to test the Language service API from your local machine. What should you do first?

medium
  • A.Configure a managed identity for the resource
  • B.Add your public IP address to the ipRules array in the networkAcls
  • C.Change the defaultAction to Allow
  • D.Use Azure CLI to enable the resource

Why B: The ARM template in the exhibit sets `defaultAction` to `Deny`, which blocks all traffic not explicitly allowed by the `ipRules` array. To test the Language service API from your local machine, you must add your public IP address to the `ipRules` array so that the resource's network firewall permits inbound requests from your IP. Without this step, all API calls from your local machine will be rejected with a 403 Forbidden error.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI-102 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 AI-102 exam.