Microsoft Identity Platform and MSAL · AZ-204: Developing Solutions for Microsoft Azure Implement Azure Security
A .NET desktop application needs to sign a user in interactively and call Microsoft Graph on that user's behalf. The application is registered as a p…
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-6C5E87
A .NET desktop application needs to sign a user in interactively and call Microsoft Graph on that user's behalf. The application is registered as a public client and cannot safely store a client secret. Which MSAL.NET approach is most appropriate?
- A.Create a ConfidentialClientApplication and call AcquireTokenForClient with the application secret
- B.Create a PublicClientApplication and call AcquireTokenInteractive with the required delegated scopesCorrect answer
- C.Call the Microsoft Graph API directly without acquiring an access token
- D.Create a PublicClientApplication and call AcquireTokenForClient with the user's password
Solution
A public client such as a desktop application cannot keep a client secret securely. MSAL.NET uses PublicClientApplication and AcquireTokenInteractive for interactive user authentication, requesting delegated scopes such as User.Read.
More from Microsoft Identity Platform and MSAL
- 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…
- A web application signs in a user with Microsoft Identity Platform and receives both an ID token and an access token. The application must…
- 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