{"record":{"id":"cc1dfdade54ec9f6","repo":"microsoft/graphrag","slug":"no-storage-account-blob-url-provided-for-blob-stor","errorCode":null,"errorMessage":"No storage account blob url provided for blob storage.","messagePattern":"No storage account blob url provided for blob storage\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"packages/graphrag/graphrag/logger/blob_workflow_logger.py","lineNumber":39,"sourceCode":"\n    def __init__(\n        self,\n        connection_string: str | None,\n        container_name: str | None,\n        blob_name: str = \"\",\n        base_dir: str | None = None,\n        account_url: str | None = None,\n        level: int = logging.NOTSET,\n    ):\n        \"\"\"Create a new instance of the BlobWorkflowLogger class.\"\"\"\n        super().__init__(level)\n\n        if container_name is None:\n            msg = \"No container name provided for blob storage.\"\n            raise ValueError(msg)\n        if connection_string is None and account_url is None:\n            msg = \"No storage account blob url provided for blob storage.\"\n            raise ValueError(msg)\n\n        self._connection_string = connection_string\n        self.account_url = account_url\n        self._base_dir = base_dir\n\n        if self._connection_string:\n            self._blob_service_client = BlobServiceClient.from_connection_string(\n                self._connection_string\n            )\n        else:\n            if account_url is None:\n                msg = \"Either connection_string or account_url must be provided.\"\n                raise ValueError(msg)\n\n            self._blob_service_client = BlobServiceClient(\n                account_url,\n                credential=DefaultAzureCredential(),\n            )","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/microsoft/graphrag/blob/f40e9a26ce62ba0b3fef8837d24aafdcc6e6c704/packages/graphrag/graphrag/logger/blob_workflow_logger.py#L21-L57","documentation":"GraphRAG's BlobWorkflowLogger requires either an Azure Storage connection string or an account blob URL to construct a blob service client. If both connection_string and account_url are None, the constructor cannot connect to Azure Blob Storage and raises this ValueError immediately. It is a configuration/validation error thrown before any network call.","triggerScenarios":"Instantiating BlobWorkflowLogger(container_name='x') without passing connection_string or account_url; passing both as None explicitly; loading config from settings/env where the storage keys are missing or empty.","commonSituations":"Running GraphRAG workflows with GRAPHRAG_CACHE_CONNECTION_STRING or blob connection settings unset; typos in the env var names in .env; migrating config where the blob logger args were renamed; local runs that accidentally enable blob logging without credentials.","solutions":["Set the connection string via BlobWorkflowLogger(connection_string=...) or the corresponding env/settings field","Alternatively pass account_url (e.g. https://<account>.blob.core.windows.net) so DefaultAzureCredential auth is used","If you don't need blob logging, disable/switch the workflow logger instead of configuring it","Verify .env is loaded and variable names match what the config loader expects"],"exampleFix":"# before\nlogger = BlobWorkflowLogger(container_name='logs')\n# after\nlogger = BlobWorkflowLogger(\n    container_name='logs',\n    connection_string=os.environ['AZURE_STORAGE_CONNECTION_STRING'],\n)","handlingStrategy":"validation","validationCode":"conn = os.environ.get('GRAPHRAG_CACHE_CONNECTION_STRING')\nurl = os.environ.get('AZURE_STORAGE_BLOB_URL')\nif not conn and not url:\n    raise SystemExit('Configure blob storage credentials or disable blob logging')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize storage config validation at app startup","Fail fast in CI when blob logging is enabled without credentials"],"tags":["azure","blob-storage","configuration","graphrag"],"backgroundTag":"missing-storage-credentials","analyzedSha":"f40e9a26ce62ba0b3fef8837d24aafdcc6e6c704","analyzedAt":"2026-08-27T11:16:29.677Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}