Courseiva

AZ-400 Practice Question: Design and implement build and release pipelines

Network Topology
az acr buildregistry myregistryimage myapp:$(Build.BuildId) .```azurecli```

The pipeline fails with the error 'The resource with name 'myregistry' could not be found'. What is the most likely cause?

⚠ Common exam trap

AZ-400 often tests the distinction between resource-not-found errors and permission errors; candidates may incorrectly choose the service connection permission option when the error explicitly says the resource could not be found.

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 Azure Container Registry name is incorrect

The error 'The resource with name 'myregistry' could not be found' indicates that the pipeline is trying to reference an Azure Container Registry that does not exist or is misspelled. The most likely cause is that the registry name in the pipeline configuration is incorrect, such as a typo or wrong environment variable. This is a resource resolution error, not a permissions or tooling issue.

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 Azure Container Registry name is incorrect

    Why this is correct

    The error 'resource with name m' indicates Azure DevOps cannot locate the specified Azure Container Registry (ACR) resource, which means the registry name provided in the task or variable does not exist or is misspelled in the current subscription/tenant. A correct ACR name must exactly match the globally unique registry name (e.g., 'myregistry.azurecr.io' without the domain), and any typo or mismatch will result in a 'not found' exception, not an authentication or CLI failure.

  • ✗

    The build ID variable is not defined

    Why it's wrong here

    The build ID variable is unrelated to resource resolution; if it were undefined, you would see a pipeline evaluation error such as 'variable not found' or an empty string being passed, not an Azure Resource Manager error about a named resource. The error explicitly refers to a resource name, so the root cause is an invalid registry identifier, not a missing pipeline variable.

  • ✗

    The service connection does not have permission to access the registry

    Why it's wrong here

    Permissions issues with a service connection to ACR manifest as HTTP 401 Unauthorized or 403 Forbidden responses, such as 'Authentication failed' or 'Repository not found' when trying to access a registry that exists but the principal lacks Reader/Contributor roles. The stated error says the resource itself could not be found, which means the registry name lookup failed, not that access was denied to an existing resource.

  • ✗

    The Azure CLI is not installed on the agent

    Why it's wrong here

    If the Azure CLI were missing from the agent, the pipeline task would fail with a different error, such as 'az: command not found' or 'The Azure CLI is not installed on this agent', indicating a tooling issue. Here the failure is specifically about an Azure Resource Manager resource lookup, which uses the Azure REST API/ARM, not the Azure CLI; even if the CLI were installed, a nonexistent registry name would still produce the same 'not found' error.

About these practice questions

One of 696 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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