title: Azure functions key vault app settings not working
body: <p>What am I doing wrong trying to set the following in my Functions v2 app settings.</p>
  
  <pre><code>@Microsoft.KeyVault(SecretUri=&lt;uri&gt;)
  </code></pre>
  
  <p>Reading this inside the function I get the full string out and not the connection string from the key vault as I expected.</p>
  
  <pre><code>var config = new ConfigurationBuilder()
                  .SetBasePath(context.FunctionAppDirectory)
                  .AddJsonFile("local.settings.json", optional: true, reloadOnChange: true)
                  .AddEnvironmentVariables()
                  .Build();
  
  var value = config["cstring"];
  var connectionString = Environment.GetEnvironmentVariable("cstring");
  
  log.Info(value); // Prints "@Microsoft.KeyVault(SecretUri=&lt;uri&gt;)"
  log.Info(connectionString); // Prints "@Microsoft.KeyVault(SecretUri=&lt;uri&gt;)"
  </code></pre>
  
  <p>Do I need to take more steps?</p>
  
  <p>The function as an MSI which has access to the key vault.</p>
  
  <p>Multiple tutorials online make this seem so easy and working out of the box.</p>