Courseiva
Implement Azure securitymediumMultiple ChoiceObjective-mapped

AZ-204 Implement Azure security Practice Question

Your API is secured using Azure AD (now Microsoft Entra ID) tokens. You need to validate the token in your custom code. Which library should you use to validate the token's signature, issuer, and audience?

⚠ Common exam trap

Many candidates confuse MSAL (which acquires tokens) with the token validation libraries, assuming the same library handles both sides of the authentication flow.

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

Microsoft.IdentityModel.Tokens and System.IdentityModel.Tokens.Jwt

The Microsoft.IdentityModel.Tokens and System.IdentityModel.Tokens.Jwt libraries provide the core token validation logic (signature verification, issuer, audience) that can be used in custom code, independent of any framework. These libraries implement the JWT validation pipeline as defined in RFC 7519, allowing you to call TokenValidationParameters and JwtSecurityTokenHandler.ValidateToken() to manually verify the token's integrity and claims.

Answer analysis

Option-by-option breakdown

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

  • ASP.NET Core Identity

    Why it's wrong here

    ASP.NET Core Identity is a membership system primarily used for managing user accounts, profiles, passwords, and roles within an application's own data store. It facilitates local user authentication and authorization, often involving username/password logins and cookie-based authentication. It is not designed to validate JSON Web Tokens (JWTs) issued by external identity providers like Azure AD/Microsoft Entra ID for API security.

  • Microsoft Graph SDK

    Why it's wrong here

    The Microsoft Graph SDK is a client library that simplifies making calls to the Microsoft Graph API, which provides access to data and intelligence across Microsoft 365 services. Its purpose is to consume services and retrieve information from the Graph, such as user profiles, calendar events, or OneDrive files. It does not contain any server-side functionality or methods for validating incoming bearer tokens presented to your own custom API.

  • Microsoft Authentication Library (MSAL)

    Why it's wrong here

    MSAL (Microsoft Authentication Library) is a client-side library used by applications to acquire security tokens (access tokens, ID tokens) from the Microsoft identity platform. It handles the complex OAuth 2.0 and OpenID Connect protocol flows, enabling applications to authenticate users and obtain tokens to call protected APIs. However, MSAL's role is token acquisition for client applications, not server-side token validation for an API receiving those tokens.

  • Microsoft.IdentityModel.Tokens and System.IdentityModel.Tokens.Jwt

    Why this is correct

    These libraries are the foundational components in .NET for handling and validating JSON Web Tokens (JWTs) issued by identity providers like Azure AD/Microsoft Entra ID. System.IdentityModel.Tokens.Jwt provides the core classes for reading, writing, and performing cryptographic validation of JWTs. Microsoft.IdentityModel.Tokens supplies the necessary security token validation parameters, such as issuer, audience, lifetime, and signing key resolution, to ensure the token's authenticity and integrity when securing an API.

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 →

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.