You are developing an ASP.NET Core web application that will be hosted on two Azure App Service instances: web-app-primary and web-app-secondary. Both web apps must retrieve database connection strings from a shared Azure Key Vault named kv-shared. You decide to use a user-assigned managed identity named id-app-reader to access the Key Vault, ensuring that the identity's lifecycle is independent of the App Service instances. The application code uses the following C# code to authenticate:
csharp
var client = new SecretClient(new Uri("https://kv-shared.vault.azure.net/"), new DefaultAzureCredential());
To implement this security architecture, you assign id-app-reader to both App Service instances and configure the Key Vault access policy. Which of the following configuration steps must you also perform on each App Service instance to ensure that the application successfully authenticates?
- Add an Application Setting named AZURE_CLIENT_ID and set its value to the Client ID of the id-app-reader identity.Answer
- BAdd an Application Setting named AZURE_CLIENT_ID and set its value to the Principal (Object) ID of the id-app-reader identity.
- CAdd an Application Setting named AZURE_CLIENT_ID and set its value to the Resource ID of the id-app-reader identity.
- DAdd an Application Setting named AZURE_MANAGED_IDENTITY_ID and set its value to the Client ID of the id-app-reader identity.