# Microsoft.Azure.WebJobs.Extensions.Storage: The value for 'AzureWebJobsStorage' is missing or empty. Please set this app setting.

- **ID:** `cloud/azure-function-storage-account-missing`
- **Domain:** cloud
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

Azure Functions require a storage account connection string in the AzureWebJobsStorage app setting for internal operations like triggers and state management.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Azure Functions Runtime 4.x | active | — | — |
| Azure Functions Core Tools 4.0.5907 | active | — | — |

## Workarounds

1. **Set the AzureWebJobsStorage app setting in the Azure Portal or via CLI: az functionapp config appsettings set --name <function-app> --resource-group <rg> --settings AzureWebJobsStorage="DefaultEndpointsProtocol=https;AccountName=<storage-account>;AccountKey=<key>;EndpointSuffix=core.windows.net"** (95% success)
   ```
   Set the AzureWebJobsStorage app setting in the Azure Portal or via CLI: az functionapp config appsettings set --name <function-app> --resource-group <rg> --settings AzureWebJobsStorage="DefaultEndpointsProtocol=https;AccountName=<storage-account>;AccountKey=<key>;EndpointSuffix=core.windows.net"
   ```
2. **For local development, add the connection string to local.settings.json: { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true" } } and ensure Azure Storage Emulator or Azurite is running.** (90% success)
   ```
   For local development, add the connection string to local.settings.json: { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true" } } and ensure Azure Storage Emulator or Azurite is running.
   ```
3. **Use managed identity instead of connection string: set AzureWebJobsStorage__accountName=<storage-account> and assign the 'Storage Blob Data Contributor' and 'Storage Queue Data Contributor' roles to the function app's managed identity.** (85% success)
   ```
   Use managed identity instead of connection string: set AzureWebJobsStorage__accountName=<storage-account> and assign the 'Storage Blob Data Contributor' and 'Storage Queue Data Contributor' roles to the function app's managed identity.
   ```

## Dead Ends

- **** — Setting AzureWebJobsStorage to a non-existent storage account name causes a different error later. (90% fail)
- **** — Using a SAS token without proper permissions (e.g., missing Table/Queue service) leads to '403 Forbidden' on runtime start. (85% fail)
- **** — Disabling the Storage extension in host.json is not supported and breaks triggers. (100% fail)
