A developer is configuring a C# console application that will run on a user's workstation. The application must authenticate the user using the Microsoft Identity Platform to retrieve their profile from Microsoft Graph. Which two components must be configured to support this authentication flow? (Select two)
- An instance of IPublicClientApplication initialized using the Microsoft Authentication Library (MSAL)Cevap
- Delegated permissions for the Microsoft Graph API configured in the Microsoft Entra ID application registrationCevap
- CA client secret generated in Microsoft Entra ID and stored in the application settings
- DAn App Configuration key-value pair that uses the @Microsoft.KeyVault syntax to reference the authentication token
Cevap
The correct configurations are initializing an instance of IPublicClientApplication using the Microsoft Authentication Library (MSAL) and configuring delegated permissions for the Microsoft Graph API.
The C# console application runs on a local workstation and is a public client, meaning it cannot securely store secrets. Therefore, it requires the IPublicClientApplication interface from MSAL to acquire tokens. Since the application accesses Microsoft Graph on behalf of the signed-in user, delegated permissions must be configured in Microsoft Entra ID.
Adım Adım Çözüm
Anahtar Kavram
Public client authentication flow using MSAL and delegated permissions