You are developing a secure multi-tier web application consisting of a front-end single-page application (SPA) and a backend web API. The SPA must acquire a secure token to call the backend web API on behalf of the signed-in user. Which OAuth 2.0 flow is recommended for the SPA to obtain this access token?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Authorization Code Flow with Proof Key for Code Exchange (PKCE).

For Single Page Applications (SPAs), the Authorization Code Flow with PKCE is the industry standard and recommended flow by the Microsoft Identity Platform. It replaces the legacy ...

๐Ÿ“‹Part of Microsoft Certified: Azure Developer Associate (AZ-204) ยท Azure Certification Practice
Real Exam ScenarioAzure Active Directory (Entra ID)

You are developing a secure multi-tier web application consisting of a front-end single-page application (SPA) and a backend web API. The SPA must acquire a secure token to call the backend web API on behalf of the signed-in user. Which OAuth 2.0 flow is recommended for the SPA to obtain this access token?

โœ“ Correct Answer & ExplanationAzure Active Directory (Entra ID)

Correct Answer

Authorization Code Flow with Proof Key for Code Exchange (PKCE).

Why This Answer Is Correct

For Single Page Applications (SPAs), the Authorization Code Flow with PKCE is the industry standard and recommended flow by the Microsoft Identity Platform. It replaces the legacy Implicit Flow, which is no longer considered secure because it returns access tokens directly in the URL hash, exposing them to browser history and cross-site scripting (XSS) attacks.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Azure Active Directory (Entra ID) โ€” a core concept tested in Microsoft Certified: Azure Developer Associate (AZ-204). Understanding Azure Active Directory (Entra ID) is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.