How can I configure my Azure Function to retrieve a Key Vault secret when invoked by an Azure Logic App?

John van Zalk 20 Reputation points
2025-05-04T01:56:15.9566667+00:00

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:

  1. Enabled a system-assigned managed identity on the Function App and Logic App
  2. 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}'."}}

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,416 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.