title: Azure Function - Replace the AzureWebJobsStorage value in local.settings.json with Azure Key Vault connection string
body: <p>I am implementing the Azure Key Vault Managed Identity in Azure Durable Function.</p>
  <p><strong>Startup.cs</strong></p>
  <pre><code>public class Startup : FunctionsStartup
  {
      private const string localSettingsJson = &quot;local.settings.json&quot;;
  
      private IConfigurationBuilder GetConfiguration(FunctionsHostBuilderContext context) =&gt; new ConfigurationBuilder()
              .SetBasePath(context.ApplicationRootPath)
              .AddJsonFile(localSettingsJson, optional: true, reloadOnChange: true)
              .AddEnvironmentVariables();
  
      public override void Configure(IFunctionsHostBuilder builder)
      {
          FunctionsHostBuilderContext context = builder.GetContext();
          var configBuilder = GetConfiguration(context);
  
          DefaultAzureCredential credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = &quot;61063c32-379d-4e9d-8977-4b826c2bc50a&quot; });
          SecretClient secretClient = new SecretClient(new Uri(&quot;https://storageaccount.vault.azure.net/&quot;), credential);
          configBuilder.AddAzureKeyVault(secretClient, new KeyVaultSecretManager());
  
          IConfigurationRoot config = configBuilder.Build();
          var keyVaultConnectionStringValue = config[&quot;storageaccount-connectionstring&quot;];
  
          //Getting the connection string value in keyVaultConnectionStringValue.
  
          var services = builder.Services;
          services.ConfigureAutoMapper();
      }
  }
  </code></pre>
  <p><strong>Orchestration.cs</strong></p>
  <pre><code>public class Orchestration
  {
      [FunctionName(&quot;Orchestrator&quot;)]
      public async Task Run([OrchestrationTrigger] IDurableOrchestrationContext context, ILogger logger)
      {
          //Code
      }
  }
  </code></pre>
  <p>I am getting the connection string value in keyVaultConnectionStringValue variable. Now I want to replace keyVaultConnectionStringValue variable value in the <strong>local.settings.json</strong> file =&gt; Values section =&gt; <code>AzureWebJobsStorage</code> section value. Current value is &quot;<code>UseDevelopmentStorage=true</code>&quot; and I want to replace with Azure Key Vault connection string value.</p>
  <p><strong>local.settings.json</strong></p>
  <pre><code>{
    &quot;IsEncrypted&quot;: false,
    &quot;Values&quot;: {
      &quot;AzureWebJobsStorage&quot;: &quot;UseDevelopmentStorage=true&quot;, // Replace &quot;UseDevelopmentStorage=true&quot; value with Azure Key Vault connection string value.
      &quot;FUNCTIONS_WORKER_RUNTIME&quot;: &quot;dotnet&quot;
    },
    &quot;WorkflowConfiguration&quot;: {
      &quot;Name&quot;: &quot;Lilly&quot;
    }
  }
  </code></pre>
  <p><strong>NOTE: I don't want to use the Environment Variable.</strong></p>
  <p>Any help is really appreciated.</p>