title: Azure Function Environment Variables
body: <p>I'm trying to create a super basic Azure Function, but am having trouble with environment variables.  Following various tutorials online,</p>
  
  <pre><code>        var config = new ConfigurationBuilder()
               .SetBasePath(context.FunctionAppDirectory)
               .AddJsonFile("local.settings.json", optional: true, reloadOnChange: true)
               .AddEnvironmentVariables()
               .Build();
  
          log.Info(config["AzureWebJobsStorage"]);
  </code></pre>
  
  <p>My local.settings.json looks like this: </p>
  
  <pre><code>{
    "IsEncrypted": false,
    "Values": {
      "FUNCTIONS_WORKER_RUNTIME": "&lt;language worker&gt;",
      "AzureWebJobsStorage": "abc123",
      "AzureWebJobsDashboard": "abc123",
      "MyBindingConnection": "abc123"
    },
    "Host": {
      "LocalHttpPort": 7071,
      "CORS": "*"
    }
  }
  </code></pre>
  
  <p>When I run this locally, that</p>
  
  <pre><code>log.Info(config["AzureWebJobsStorage"]); 
  </code></pre>
  
  <p>line returns nothing... but when I deploy to Azure I see "abc123" in the console.</p>
  
  <p>If, however, I alter that line to</p>
  
  <pre><code>log.Info(config["Values:AzureWebJobsStorage"]);
  </code></pre>
  
  <p>Then when I run locally, I see "abc123" but when I deploy to Azure I see nothing.</p>
  
  <p>Is there something I'm missing to be able to reach the environment variables the same way locally vs deployed?</p>
  
  <p>EDIT: To clarify, these settings <strong>are</strong> configured in the app settings for the function: 
  <a href="https://i.stack.imgur.com/B5qHn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/B5qHn.png" alt="enter image description here"></a></p>