question

KhasMohit-7572 avatar image
0 Votes"
KhasMohit-7572 asked ajkuma-MSFT commented

app service configuration accessing key vault keys using manage identities?

Azure functions can access the reference of keys from key vaults when authenticated via manage identities.
Means If we copy the reference of key from key vault, add a key in configuration of function app, its value as the reference of key(eg: @Microsoft.KeyVault(SecretUri=https://xyzVault.vault.azure.net/secrets/testKey/)), enable the manage identity, then function app can directly access the value of that key in Key vault.
There is no need for code change. But can we do the same for App service?
I am looking for a way, that i put the reference of key from key vault in the configuration of app service and it is able to access it from keyVault directly once manage identity is enabled for this app service in Key Vault. and No code change is required.

azure-webappsazure-functionsazure-key-vaultazure-managed-identity
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ajkuma-MSFT avatar image
0 Votes"
ajkuma-MSFT answered ajkuma-MSFT commented

@KhasMohit-7572, Apologies for the delay in responding from over the weekend.

The feature is shared by both products ( App Service and Azure Functions). It should work for App Service as well, please see this doc -This topic shows you how to work with secrets from Azure Key Vault in your App Service or Azure Functions application without requiring any code changes.

Please let us know if this works/you're facing any specific issues (errors) implementing the same for App Service/ or if I have misunderstood your question.



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, this option works for both, app service and function apps. I got the issue now. Sometimes it just takes some time to reflect when we provide the access via manage identities and update the configuration settings. When we update the configuration settings very first time after giving access, it took some time to reflect. After then if i change any configuration then it will reflect immediately. That was my issue.

0 Votes 0 ·

Glad to know that the issue is sorted out. Thanks for the update.
If you still observe the initial delay in configuration/changes takes a while to reflect, please let us know we can check on this further.

0 Votes 0 ·