How can I configure my Azure Function to retrieve a Key Vault secret when invoked by an Azure Logic App?
I’ve stored an API key as a secret in Azure Key Vault and want my Function App—called from a Logic App—to pull that secret at runtime. I’ve already:
- Enabled a system-assigned managed identity on the Function App and Logic App
- Granted Key Vault Secrets User access to the Function App and Logic App
Despite this, when the I try to add the Azure function to my Logic App and save, I’m getting the error message below. What could I be missing?
Workflow validation failed for the workflow ''. {"error":{"code":"ListFunctionKeysFailed","message":"Request to obtain the keys for function ... failed. Error details: '{"Code":"BadRequest","Message":"Encountered an error (InternalServerError) from host runtime.","Target":null,"Details":[{"Message":"Encountered an error (InternalServerError) from host runtime."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"BadRequest","Message":"Encountered an error (InternalServerError) from host runtime."}}],"Innererror":null}'."}}