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?

  1. A.The ID token, because it contains the user's identity claims
  2. B.The access token, because its audience identifies the protected APICorrect answer
  3. C.The refresh token, because it can be exchanged by any API
  4. 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

All of Microsoft Identity Platform and MSAL

Practise more Implement Azure Security

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed