AZ-204 Implement Azure security Practice Question
Your application uses Azure App Service and needs to authenticate users via Microsoft Entra ID. You want to minimize code changes. Which feature should you use?
⚠ Common exam trap
Many exam-takers choose Microsoft.Identity.Web or MSAL.js because they are familiar with code-based authentication, overlooking that the question explicitly prioritizes minimizing code changes, which is the core advantage of Easy Auth's platform-level integration.
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)
App Service Authentication (also known as Easy Auth) is the correct choice because it enables authentication with Microsoft Entra ID (formerly Azure AD) at the platform level, requiring no code changes in your application. It automatically handles token validation, session management, and redirects by intercepting HTTP requests before they reach your app code, which directly satisfies the requirement to minimize code changes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Azure AD B2C
Why it's wrong here
Azure AD B2C (Business-to-Consumer) is specifically designed for managing customer identities in consumer-facing applications, enabling users to sign up, sign in, and manage their profiles using local accounts or social identity providers. It is not intended for authenticating an organization's internal users or enterprise applications against its own Microsoft Entra ID tenant. Implementing B2C would introduce an entirely separate identity directory and authentication flow, which is inappropriate for typical enterprise application scenarios.
- ✗
Microsoft.Identity.Web library
Why it's wrong here
The Microsoft.Identity.Web library is a server-side wrapper around MSAL.NET that simplifies integrating authentication and authorization with the Microsoft identity platform into ASP.NET Core web apps and web APIs. While powerful, its implementation requires direct modification of the application's backend source code to configure authentication middleware, acquire tokens, and protect API endpoints. This approach necessitates significant code changes and development effort within the application itself, which might not align with a goal of minimal code modification.
- ✓
App Service Authentication (Easy Auth)
Why this is correct
App Service Authentication, commonly known as Easy Auth, is a platform-level feature of Azure App Service that provides built-in authentication and authorization capabilities without requiring code changes within the application. It acts as an authentication proxy, intercepting requests and handling the entire authentication flow with Microsoft Entra ID, then passing user claims to the application via HTTP headers. This approach offers seamless integration with enterprise identities and significantly reduces development overhead, making it ideal for scenarios prioritizing minimal application code modifications.
- ✗
MSAL.js
Why it's wrong here
MSAL.js (Microsoft Authentication Library for JavaScript) is a client-side library used primarily in single-page applications (SPAs) to authenticate users and acquire tokens for accessing protected web APIs. Implementing MSAL.js requires direct modifications to the application's front-end (client-side) JavaScript code to manage user sign-in, token acquisition, and caching. This approach involves substantial client-side development and is distinct from server-side or platform-managed authentication solutions.
Go deeper
Related to this question
About these practice questions
This AZ-204 question is part of Courseiva's 881-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 →
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.