You are developing a background utility service that runs on an on-premises Windows server. The service must periodically retrieve diagnostic data from a secure custom web API protected by Microsoft Entra ID. You register the utility as an application in your Microsoft Entra ID tenant. The service must authenticate programmatically without user interaction using a certificate. Which two configuration steps should you perform? (Choose two.)
- Upload the public key portion of the certificate to the application registration in Microsoft Entra ID.Answer
- Configure the application to request an access token using the OAuth 2.0 client credentials grant flow.Answer
- CConfigure a system-assigned managed identity on the on-premises server and grant it permissions to access the API.
- DCreate an Azure Key Vault access policy that grants the custom web API permission to retrieve the private key of the certificate.
Answer
Upload the public key portion of the certificate to the application registration in Microsoft Entra ID, and configure the application to request an access token using the OAuth 2.0 client credentials grant flow.
For background services running on-premises, authentication is performed via the OAuth 2.0 client credentials flow. Since a certificate is required for authentication, the public key (.cer) must be uploaded to the Microsoft Entra ID application registration. The client service then signs its client assertion locally using the corresponding private key to request an access token.
Step-by-Step Solution
Key Concept
Application registration authentication using certificates and client credentials flow