You are deploying an Azure Function App (V4 runtime) that needs to securely access an Azure SQL Database. The database connection string contains sensitive credentials and is stored in Azure Key Vault. You have enabled a system-assigned managed identity for the Function App.
You want to configure the Function App settings to reference the connection string from Key Vault without storing it as cleartext in the app configuration. However, when the Function runs, it fails to connect to the database and logs an authorization error indicating it cannot retrieve the secret from Key Vault.
You inspect the application setting value and find that it is:
`@Microsoft.KeyVault(SecretUri=https://myvault.vault.azure.net/secrets/dbconn/f4a5b6)`
Which of the following is the most likely cause of this issue?
- AThe Key Vault reference syntax is invalid because the @Microsoft. prefix should be omitted, and it should start directly with @KeyVault.
- BThe Function App must use a user-assigned managed identity rather than a system-assigned managed identity to resolve Key Vault references.
- The system-assigned managed identity of the Function App has not been granted GET permissions on the Key Vault secrets.Cevap
- DThe Function App is hosted on a Consumption plan, which does not support the resolution of Key Vault references.