AZ-204 Develop Azure compute solutions Practice Question
A checkout API 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
The trap here is that candidates might think authentication must be handled inside the function code (e.g., using custom middleware or token validation), but Azure Functions provides a built-in platform-level authentication feature (Easy Auth) that rejects unauthenticated calls before execution.
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 authentication provider at the App Service platform level. This ensures that the HTTP trigger function only receives requests with valid tokens, without requiring custom authorization logic in the function code.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deployment slots
Why it's wrong here
Deployment slots route traffic between staged app versions; they perform no authentication, so unauthenticated requests still reach function code. They are tempting because slots can swap and warm instances, and would be correct for zero-downtime releases or staging validation, not for rejecting callers.
- ✓
App Service Authentication / Easy Auth with Microsoft Entra ID
Why this is correct
Configuring App Service Authentication with Microsoft Entra ID validates tokens at the platform's reverse proxy, so unauthenticated requests are rejected with 401 before the function's code ever runs. This satisfies the stem's requirement to block calls pre-execution, unlike in-code token validation, which only occurs once the function has already been invoked.
- ✗
Application Insights sampling
Why it's wrong here
Application Insights sampling reduces telemetry volume; it never intercepts or rejects HTTP requests, so unauthenticated calls execute the function. It is tempting because Application Insights observes every invocation, and would be correct for controlling monitoring cost or tracing failures, not for authorisation.
- ✗
Function timeout
Why it's wrong here
Function timeout caps execution duration; an unauthenticated request still invokes the function and runs until that limit. It is tempting because timeouts protect against runaway executions, and would be correct for bounding long-running work, not for blocking callers before code runs.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
Learn chapter
Custom Telemetry with Application Insights SDK
Key term
Azure App Service Authentication
Azure App Service Authentication is a built-in feature that allows web apps, mobile backends, and API apps to authenticate users without requiring custom code from the developer.
Key term
Azure Functions Bindings
Azure Functions Bindings are declarative connections that link your serverless function code to Azure services or external resources, handling input and output data automatically without writing extra networking or authentication code.
About these practice questions
Courseiva writes every AZ-204 question from scratch — 883 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 →
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.