Microsoft Identity Platform and MSAL · AZ-204: Developing Solutions for Microsoft Azure Implement Azure Security
A web application signs in a user with Microsoft Identity Platform and receives both an ID token and an access token. The application must call a pro…
Practice question from Microsoft Identity Platform and MSAL (AZ-204: Developing Solutions for Microsoft Azure Implement Azure Security), with the correct answer and a step-by-step solution.
easy · MCQ · Q-3AB6CE
A web application signs in a user with Microsoft Identity Platform and receives both an ID token and an access token. The application must call a protected REST API on behalf of the user. Which token should it send to the API?
- A.The ID token, because it contains the user's identity claims
- B.The access token, because its audience identifies the protected APICorrect answer
- C.The refresh token, because it can be exchanged by any API
- D.The authorization code, because the API can redeem it for permissions
Solution
An access token is issued for a specific resource API and is presented in the HTTP Authorization header. An ID token describes the authentication event and is intended for the client application, not for authorization to call an API.
More from Microsoft Identity Platform and MSAL
- A .NET desktop application needs to sign a user in interactively and call Microsoft Graph on that user's behalf. The application is registe…
- A background Azure App Service must call a protected Azure resource without a signed-in user. The service is registered as a confidential c…
- An ASP.NET Core API receives an access token for the signed-in user and must call a downstream API while preserving that user's identity an…
- An app registration is configured to allow accounts in any Microsoft Entra organization, but not personal Microsoft accounts. Which Microso…
Practise more Implement Azure Security
Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.
Start practising freeFree to start · No credit card needed