Courseiva
Develop Azure compute solutionsmediumMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

A booking backend uses Azure Functions with HTTP triggers. The developer wants to reject unauthenticated calls before function code executes. Which feature should be configured?

⚠ Common exam trap

A common mix-up: candidates think authentication must be handled inside the function code using attributes like [Authorize] or manual token validation, overlooking the platform-level Easy Auth feature that rejects calls before any code runs.

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

App Service Authentication / Easy Auth with Microsoft Entra ID

App Service Authentication (Easy Auth) with Microsoft Entra ID allows the developer to reject unauthenticated calls before the function code executes by configuring the 'Action to take when request is not authenticated' to 'Log in with Microsoft Entra ID' or 'Return HTTP 401 Unauthorized'. This is enforced at the App Service platform layer, meaning the function trigger code never runs for unauthenticated requests, which is exactly the requirement.

Answer analysis

Option-by-option breakdown

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

  • Application Insights sampling

    Why it's wrong here

    Application Insights sampling is a feature designed to reduce the volume of telemetry data sent to Application Insights by selecting a representative subset of traces, requests, and events. While crucial for cost management and performance monitoring, it operates solely on collected diagnostic data and has no mechanism or capability to validate or authenticate incoming HTTP requests to an Azure Function. Therefore, it cannot secure the booking backend by controlling caller identity.

  • App Service Authentication / Easy Auth with Microsoft Entra ID

    Why this is correct

    App Service Authentication, often referred to as Easy Auth, provides a built-in, declarative authentication and authorization layer for Azure App Services, including Azure Functions. When configured with Microsoft Entra ID, it intercepts HTTP requests *before* they reach the function's application code, validating caller identity against Entra ID and injecting user claims into the request headers. This effectively secures the HTTP trigger by ensuring only authenticated and authorized users can invoke the function.

  • Deployment slots

    Why it's wrong here

    Deployment slots in Azure Functions allow for staging environments, enabling zero-downtime deployments and A/B testing by swapping different versions of an application. While beneficial for managing the deployment lifecycle and ensuring application stability, deployment slots are purely an operational feature related to code deployment and version management. They do not provide any inherent functionality to authenticate or authorize incoming HTTP requests to the function endpoint.

  • Function timeout

    Why it's wrong here

    A function timeout defines the maximum duration an Azure Function execution is allowed to run before it is automatically terminated. This setting is critical for managing resource consumption and preventing long-running, potentially problematic executions, especially in consumption plans. However, the timeout mechanism is solely concerned with the execution lifespan of the function's code and has no bearing on verifying the identity of the client or user making the HTTP request.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.