Your ASP.NET Core web API must allow users to authenticate via Microsoft Entra ID (Azure AD) and must only grant access if the caller has the 'Reports.Read' app role assigned. Which authentication flow and validation approach is most appropriate for API-to-API calls?

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

Correct Answer: Use the OAuth 2.0 client credentials flow; the calling app requests a token with the 'Reports.Read' application permission, and the API validates the token's 'roles' claim

For daemon/service-to-service calls, the OAuth 2.0 client credentials flow is appropriate. The calling application is granted the 'Reports.Read' application permission in Entra ID....

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

Your ASP.NET Core web API must allow users to authenticate via Microsoft Entra ID (Azure AD) and must only grant access if the caller has the 'Reports.Read' app role assigned. Which authentication flow and validation approach is most appropriate for API-to-API calls?

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

Correct Answer

Use the OAuth 2.0 client credentials flow; the calling app requests a token with the 'Reports.Read' application permission, and the API validates the token's 'roles' claim

Why This Answer Is Correct

For daemon/service-to-service calls, the OAuth 2.0 client credentials flow is appropriate. The calling application is granted the 'Reports.Read' application permission in Entra ID. The API validates the JWT access token's 'roles' claim to enforce authorization.

๐Ÿ“š 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.