A company is developing a C# daemon application that runs on an on-premises server. The application must connect to Microsoft Graph to read directory data without any user intervention.
Which two configuration steps must you perform to enable authentication for this daemon application? Select two.
- Register the application as a confidential client in Microsoft Entra ID and configure a client secret or certificate.Cevap
- Initialize the application using the ConfidentialClientApplicationBuilder class in the Microsoft Authentication Library (MSAL.NET).Cevap
- CRegister the application as a public client in Microsoft Entra ID and configure a redirect URI.
- DInitialize the application using the PublicClientApplicationBuilder class in MSAL.NET and configure the device code flow.
Cevap
To enable authentication for the daemon application, you must register the application as a confidential client in Microsoft Entra ID and configure a client secret or certificate, and initialize the application using the ConfidentialClientApplicationBuilder class in MSAL.NET.
The application runs unattended as a daemon service. In Microsoft Entra ID, this requires a confidential client registration with a client secret or certificate. In MSAL.NET, the developer must use the ConfidentialClientApplicationBuilder class to initialize the client and acquire tokens using the client credentials flow.
Adım Adım Çözüm
Anahtar Kavram
Daemon applications run without user interaction and must be configured as confidential clients using MSAL.NET ConfidentialClientApplicationBuilder and registered in Microsoft Entra ID with appropriate credentials (client secrets or certificates).