{"record":{"id":"e3018b7635486fe0","repo":"dotnet/orleans","slug":"no-credentials-specified-for-azure-blob-service-le","errorCode":null,"errorMessage":"No credentials specified for Azure Blob Service lease provider \"{name}\". Use the AzureBlobLeaseProviderOptions.ConfigureBlobServiceClient method to configure the Azure Blob Service client.","messagePattern":"No credentials specified for Azure Blob Service lease provider \"(.+?)\"\\. Use the AzureBlobLeaseProviderOptions\\.ConfigureBlobServiceClient method to configure the Azure Blob Service client\\.","errorType":"exception","errorClass":"OrleansConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/Azure/Orleans.Streaming.AzureStorage/Options/AzureBlobLeaseProviderOptions.cs","lineNumber":155,"sourceCode":"        /// <param name=\"options\">The option to be validated.</param>\n        /// <param name=\"name\">The option name to be validated.</param>\n        private AzureBlobLeaseProviderOptionsValidator(AzureBlobLeaseProviderOptions options, string? name)\n        {\n            this.options = options;\n            this.name = name ?? string.Empty;\n        }\n\n        public void ValidateConfiguration()\n        {\n            // name can be null, but not empty or white space.\n            if(this.name != null && string.IsNullOrWhiteSpace(this.name))\n            {\n                throw new OrleansConfigurationException($\"Named option {nameof(AzureBlobLeaseProviderOptions)} of name {this.name} is invalid.  Name cannot be empty or whitespace.\");\n            }\n\n            if (this.options.CreateClient is null)\n            {\n                throw new OrleansConfigurationException($\"No credentials specified for Azure Blob Service lease provider \\\"{name}\\\". Use the {options.GetType().Name}.{nameof(AzureBlobLeaseProviderOptions.ConfigureBlobServiceClient)} method to configure the Azure Blob Service client.\");\n            }\n\n            try\n            {\n                AzureBlobUtils.ValidateContainerName(this.options.BlobContainerName);\n            }\n            catch (ArgumentException e)\n            {\n                var errorStr = string.IsNullOrEmpty(this.name)\n                    ? $\"Configuration for {nameof(AzureBlobLeaseProviderOptions)} {this.name} is invalid. {nameof(this.options.BlobContainerName)} is not valid\"\n                    : $\"Configuration for {nameof(AzureBlobLeaseProviderOptions)} is invalid. {nameof(this.options.BlobContainerName)} is not valid\";\n                throw new OrleansConfigurationException(errorStr , e);\n            }\n        }\n    }\n\n}\n","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/Azure/Orleans.Streaming.AzureStorage/Options/AzureBlobLeaseProviderOptions.cs#L137-L173","documentation":"Thrown by AzureBlobLeaseProviderOptionsValidator.ValidateConfiguration() when options.CreateClient is null. This is the credential check for the Blob lease provider used by Azure Storage streaming — no BlobServiceClient was configured, so the lease provider cannot acquire or manage blob leases. The message references the ConfigureBlobServiceClient method and interpolates the provider name.","triggerScenarios":"Fires during ValidateConfiguration() when CreateClient is null because no ConfigureBlobServiceClient overload was called and BlobServiceClient property was not set on AzureBlobLeaseProviderOptions. This validator runs during silo configuration validation.","commonSituations":"Streaming provider configured with AddAzureBlobLeaseProvider but the configure delegate doesn't set credentials. Missing connection string in appsettings for the streaming section. Using Azure Storage streaming without configuring the lease provider's Blob client. Environment-specific config not loaded in CI.","solutions":["Call options.ConfigureBlobServiceClient(connectionString) or set options.BlobServiceClient in the AddAzureBlobLeaseProvider configure delegate.","Ensure the connection string is available in IConfiguration for the streaming provider's configuration section.","If using Managed Identity, configure the BlobServiceClient with a Uri and DefaultAzureCredential.","Validate the configuration early in CI using IConfigurationValidator."],"exampleFix":"// before\nsiloBuilder.AddAzureTableStorage(\"msgs\", b =>\n{\n    b.ConfigureStreamPartitioning(typeof(MyStream)); // forgot lease config\n});\n\n// after\nsiloBuilder.AddAzureBlobLeaseProvider(\"blobLeases\", o =>\n{\n    o.ConfigureBlobServiceClient(configuration.GetConnectionString(\"AzureStorage\"));\n});","handlingStrategy":"validation","validationCode":"// Verify lease provider credentials are configured\nvar options = sp.GetRequiredService<IOptionsMonitor<AzureBlobLeaseProviderOptions>>().Get(\"blobLeases\");\nif (options.CreateClient is null && options.BlobServiceClient is null)\n    throw new InvalidOperationException(\"AzureBlobLeaseProvider 'blobLeases' has no BlobServiceClient configured.\");","typeGuard":null,"tryCatchPattern":"try { await host.StartAsync(ct); }\ncatch (OrleansConfigurationException ex) when (ex.Message.Contains(\"No credentials specified\"))\n{\n    logger.LogCritical(ex, \"Blob lease provider credentials missing — configure BlobServiceClient.\");\n    throw;\n}","preventionTips":["Always provide a configure delegate that sets credentials when registering the lease provider.","Validate that the connection string is present in IConfiguration before silo start.","Prefer setting BlobServiceClient directly over the obsolete ConfigureBlobServiceClient.","Use environment-specific configuration providers to ensure credentials are available in all environments."],"tags":["azure","blob-storage","lease-provider","configuration","credentials","streaming","orleans"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}