{
  "id": "cloud/azure-function-storage-account-missing",
  "signature": "Microsoft.Azure.WebJobs.Extensions.Storage: The value for 'AzureWebJobsStorage' is missing or empty. Please set this app setting.",
  "signature_zh": "Microsoft.Azure.WebJobs.Extensions.Storage：'AzureWebJobsStorage' 的值缺失或为空。请设置此应用程序设置。",
  "regex": "AzureWebJobsStorage.*missing or empty",
  "domain": "cloud",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Azure Functions require a storage account connection string in the AzureWebJobsStorage app setting for internal operations like triggers and state management.",
  "root_cause_type": "generic",
  "root_cause_zh": "Azure Functions 需要在 AzureWebJobsStorage 应用设置中提供存储帐户连接字符串，用于触发器和状态管理等内部操作。",
  "versions": [
    {
      "version": "Azure Functions Runtime 4.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Azure Functions Core Tools 4.0.5907",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Setting AzureWebJobsStorage to a non-existent storage account name causes a different error later.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using a SAS token without proper permissions (e.g., missing Table/Queue service) leads to '403 Forbidden' on runtime start.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling the Storage extension in host.json is not supported and breaks triggers.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "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\"",
      "success_rate": 0.95,
      "how": "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\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "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.",
      "success_rate": 0.9,
      "how": "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.",
      "condition": "",
      "sources": []
    },
    {
      "action": "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.",
      "success_rate": 0.85,
      "how": "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.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在 Azure 门户或通过 CLI 设置 AzureWebJobsStorage 应用设置：az functionapp config appsettings set --name <function-app> --resource-group <rg> --settings AzureWebJobsStorage=\"DefaultEndpointsProtocol=https;AccountName=<storage-account>;AccountKey=<key>;EndpointSuffix=core.windows.net\"",
    "本地开发时，将连接字符串添加到 local.settings.json：{ \"IsEncrypted\": false, \"Values\": { \"AzureWebJobsStorage\": \"UseDevelopmentStorage=true\" } } 并确保 Azure 存储模拟器或 Azurite 正在运行。",
    "使用托管标识代替连接字符串：设置 AzureWebJobsStorage__accountName=<storage-account> 并为函数应用的托管标识分配 'Storage Blob Data Contributor' 和 'Storage Queue Data Contributor' 角色。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#azurewebjobsstorage",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2024-01-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}