Soru

Zorluk: KolayMicrosoft Identity Platform Authentication

An organization is deploying a C# background service that runs on an on-premises Windows server. The service must periodically query Microsoft Graph using its own credentials, authenticated by a client certificate. Which MSAL.NET builder class must you use to instantiate the client application?

  1. ConfidentialClientApplicationBuilderCevap
  2. B
    PublicClientApplicationBuilder
  3. C
    ManagedIdentityApplicationBuilder
  4. D
    SystemAssignedIdentityBuilder

Cevap

ConfidentialClientApplicationBuilder
The correct answer is ConfidentialClientApplicationBuilder because daemon applications running on secure servers can maintain client credentials securely. In MSAL.NET, these applications are instantiated using the ConfidentialClientApplicationBuilder class.

Adım Adım Çözüm

1
Analyze the application requirements.
The application is a background service (daemon) running on-premises and needs to authenticate using its own credentials (client certificate) without user intervention.
Identifying the client application type determines the correct MSAL.NET class to use.
2
Determine the client type classification.
Since the app runs on a secure server and can maintain the confidentiality of its certificate, it is classified as a confidential client application.
MSAL.NET separates public clients (desktop/mobile/CLI) from confidential clients (daemons/web APIs/web apps).
3
Select the correct MSAL.NET builder.
Use ConfidentialClientApplicationBuilder to instantiate the client.
ConfidentialClientApplicationBuilder provides the methods needed to configure confidential client credentials like client secrets and certificates.

Anahtar Kavram

MSAL.NET Client Application Types
Bu soruyu puanla