title: Using azure KeyVault in local development
body: <p>I have seen other posts on this, but none of the answers seem to work.
  I have an azure function app that I am developing locally. It uses an app setting to get username/password from the key vault. When deployed to azure, it works perfectly. But developing locally, it is not grabbing the data from the vault.</p>
  <p>So in code, I have this :</p>
  <pre><code>var password = System.Environment.GetEnvironmentVariable(&quot;PASSWORD&quot;, EnvironmentVariableTarget.Process);
  </code></pre>
  <p>I have added my user onto the vault access policy, and added the app identity on there also. Which is why it works in azure.
  I saw this post that mentions setting an environment variable :
  <a href="https://github.com/Azure/azure-functions-host/issues/3907" rel="nofollow noreferrer">https://github.com/Azure/azure-functions-host/issues/3907</a>
  I tried that, but still no dice. Whenever I call the above code, I just get the setting key back, which looks like this :</p>
  <pre><code>@Microsoft.KeyVault(SecretUri=https://mykeyvault.vault.azure.net/secrets/PASSWORD/e97ba4bf3e2e4919b1899384ea349999)
  </code></pre>