bvt5454
bvt5454

Reputation: 365

Azure Key Vault with App Service connection error

I'm trying to set up a new app slot for my azure website.

Here is my error:

enter image description here

I've looked at a few articles online and then made sure the app slot was using System assigned identities.

But I still get the above error?

What am I missing?

Here is what it looks like on the Configuration section

enter image description here

Upvotes: 0

Views: 981

Answers (1)

Joy Wang
Joy Wang

Reputation: 42133

Make sure you have done the steps below, then it should work.

1.After enabling the system-assigned identity(MSI) of your slot, navigate to your keyvault in the portal -> Access policies -> add the MSI of your slot to the access policy with the correct secret permission, just search for your web app name, the MSI of the slot has the format as webappname/slots/slotname, details here.

2.If you use the SecretUri, the format of the connection string in your slot should be like below, double-check it.

@Microsoft.KeyVault(SecretUri=https://joykeyvault123.vault.azure.net/secrets/encryptionKey/492c7788a9da421c8b9752ef18b53f5d)

You could get the SecretUri in your secret in the portal.

enter image description here

It works fine on my side.

enter image description here

Upvotes: 2

Related Questions