Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to edit Key Vault API connection

I am using Azure Key Vault connector in the logic apps and for deploying the logic apps using ARM templates.

In the ARM templates I have added the Microsoft.Web/connections resource to include Key Vault API connection.

The API Connection gets successfully deployed, but when I open it on the portal to Authorize it I get an error :- "Failed to edit Api connection "keyvault"".

The resource template of the key vault looks like below :-

{
  "type": "Microsoft.Web/connections",
  "apiVersion": "2016-06-01",
  "name": "[parameters('connections_keyvault_name')]",
  "location": "[parameters('location')]",
  "properties": {
    "api": {
      "id": "[concat('/subscriptions/',subscription().subscriptionId,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/', parameters('connections_keyvault_name'))]"
    },
    "displayName": "",
    "customParameterValues": {}
  }
}

The status of the API connection after deployment always shows "Error". However, I am using office365 API connection as well which works fine after deployment i.e. when I authorize it, it allows me to save it.

Can anyone please help me with this issue? This is blocking us to move this logic app to production.

Thanks,

Archana Kolte

like image 541
Archana Kolte Avatar asked Mar 15 '26 14:03

Archana Kolte


1 Answers

You have to add the key vault name to connect to by setting the vaultName property under properties.paramaterValues.

Also, the end of the properties.api.id is the same for all Key Vault API Connections and should be /managedApis/keyvault.

Your ARM template would look something like this

{
  "type": "Microsoft.Web/connections",
  "apiVersion": "2016-06-01",
  "name": "[parameters('connections_keyvault_name')]",
  "location": "[parameters('location')]",
  "properties": {
    "api": {
      "id": "[concat('/subscriptions/',subscription().subscriptionId,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/keyvault')]"
    },
    "displayName": "",
    "parameterValues": {
      "vaultName": "<name-of-your-key-vault>"
    }
  }
}
like image 78
PramodValavala-MSFT Avatar answered Mar 18 '26 05:03

PramodValavala-MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!