Question 608 of 997
Develop Azure compute solutionshardMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that the app setting 'APPINSIGHTS_INSTRUMENTATIONKEY' is deprecated and must be replaced with 'APPLICATIONINSIGHTS_CONNECTION_STRING'. This is because modern Application Insights SDKs no longer rely solely on the instrumentation key for authentication and telemetry routing; the connection string includes the instrumentation key plus endpoint suffixes, enabling regional ingestion and resilience against key-only deprecation. On the Microsoft Azure Developer Associate AZ-204 exam, this tests your understanding of Azure App Service configuration and Application Insights integration, often appearing as a trap where candidates assume the old key still works. A common mistake is overlooking that ARM templates may still set the deprecated key, causing silent connection failures even when the resource exists in the same region. Remember: if telemetry fails, check the app settings—connection strings are now mandatory. Memory tip: "Key is old, string is gold"—always use the connection string for modern SDK compatibility.

AZ-204 Develop Azure compute solutions Practice Question

This AZ-204 practice question tests your understanding of develop azure compute solutions. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

```json
{
  "name": "myApp",
  "type": "Microsoft.Web/sites",
  "apiVersion": "2022-09-01",
  "location": "westus",
  "properties": {
    "serverFarmId": "/subscriptions/{sub-id}/resourceGroups/myRG/providers/Microsoft.Web/serverfarms/myPlan",
    "siteConfig": {
      "appSettings": [
        {
          "name": "APPINSIGHTS_INSTRUMENTATIONKEY",
          "value": "1234-5678"
        }
      ]
    },
    "identity": {
      "type": "SystemAssigned"
    }
  },
  "dependsOn": [
    "[resourceId('Microsoft.OperationalInsights/workspaces', 'myWorkspace')]"
  ]
}
```

You deploy the above ARM template resource. After deployment, the web app cannot connect to Application Insights. The Application Insights resource exists in the same region. What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit.

```json
{
  "name": "myApp",
  "type": "Microsoft.Web/sites",
  "apiVersion": "2022-09-01",
  "location": "westus",
  "properties": {
    "serverFarmId": "/subscriptions/{sub-id}/resourceGroups/myRG/providers/Microsoft.Web/serverfarms/myPlan",
    "siteConfig": {
      "appSettings": [
        {
          "name": "APPINSIGHTS_INSTRUMENTATIONKEY",
          "value": "1234-5678"
        }
      ]
    },
    "identity": {
      "type": "SystemAssigned"
    }
  },
  "dependsOn": [
    "[resourceId('Microsoft.OperationalInsights/workspaces', 'myWorkspace')]"
  ]
}
```

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 app setting 'APPINSIGHTS_INSTRUMENTATIONKEY' is deprecated; you should use 'APPLICATIONINSIGHTS_CONNECTION_STRING' instead.

Option B is correct because the ARM template likely sets the 'APPINSIGHTS_INSTRUMENTATIONKEY' app setting, which is deprecated. Application Insights now requires the 'APPLICATIONINSIGHTS_CONNECTION_STRING' app setting for authentication and telemetry ingestion, as the instrumentation key alone is no longer sufficient for newer SDK versions and regional endpoints.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 dependsOn is incorrect; it should reference the Application Insights resource ID.

    Why it's wrong here

    The dependsOn ensures deployment order, but the setting itself is wrong.

  • The app setting 'APPINSIGHTS_INSTRUMENTATIONKEY' is deprecated; you should use 'APPLICATIONINSIGHTS_CONNECTION_STRING' instead.

    Why this is correct

    Application Insights now requires the connection string for authentication.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The web app needs a user-assigned managed identity to access Application Insights.

    Why it's wrong here

    Managed identity is not required for sending telemetry; the key is enough.

  • The instrumentation key must be set under a different name, like 'APPINSIGHTS_KEY'.

    Why it's wrong here

    The correct setting is the connection string, not a different key name.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume the instrumentation key is still the primary connection method, but Microsoft deprecated it in favor of the connection string, which is required for newer SDK versions and regional routing.

Detailed technical explanation

How to think about this question

Under the hood, the Application Insights SDK uses the connection string to determine the ingestion endpoint (e.g., https://<region>.in.applicationinsights.azure.com) and the instrumentation key for resource identification. The connection string also supports features like AAD authentication and private endpoints, which the deprecated instrumentation key alone cannot provide. In real-world scenarios, using the old key in a multi-region deployment can cause telemetry to be sent to the wrong regional endpoint, leading to data loss.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-204 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-204 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-204 question test?

Develop Azure compute solutions — This question tests Develop Azure compute solutions — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The app setting 'APPINSIGHTS_INSTRUMENTATIONKEY' is deprecated; you should use 'APPLICATIONINSIGHTS_CONNECTION_STRING' instead. — Option B is correct because the ARM template likely sets the 'APPINSIGHTS_INSTRUMENTATIONKEY' app setting, which is deprecated. Application Insights now requires the 'APPLICATIONINSIGHTS_CONNECTION_STRING' app setting for authentication and telemetry ingestion, as the instrumentation key alone is no longer sufficient for newer SDK versions and regional endpoints.

What should I do if I get this AZ-204 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-204 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 AZ-204 exam.