dotnet/orleans · critical · OrleansConfigurationException
No credentials specified for Azure Blob Service lease provid
Error message
No credentials specified for Azure Blob Service lease provider "{name}". Use the AzureBlobLeaseProviderOptions.ConfigureBlobServiceClient method to configure the Azure Blob Service client. What it means
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.
Source
Thrown at src/Azure/Orleans.Streaming.AzureStorage/Options/AzureBlobLeaseProviderOptions.cs:155
/// <param name="options">The option to be validated.</param>
/// <param name="name">The option name to be validated.</param>
private AzureBlobLeaseProviderOptionsValidator(AzureBlobLeaseProviderOptions options, string? name)
{
this.options = options;
this.name = name ?? string.Empty;
}
public void ValidateConfiguration()
{
// name can be null, but not empty or white space.
if(this.name != null && string.IsNullOrWhiteSpace(this.name))
{
throw new OrleansConfigurationException($"Named option {nameof(AzureBlobLeaseProviderOptions)} of name {this.name} is invalid. Name cannot be empty or whitespace.");
}
if (this.options.CreateClient is null)
{
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.");
}
try
{
AzureBlobUtils.ValidateContainerName(this.options.BlobContainerName);
}
catch (ArgumentException e)
{
var errorStr = string.IsNullOrEmpty(this.name)
? $"Configuration for {nameof(AzureBlobLeaseProviderOptions)} {this.name} is invalid. {nameof(this.options.BlobContainerName)} is not valid"
: $"Configuration for {nameof(AzureBlobLeaseProviderOptions)} is invalid. {nameof(this.options.BlobContainerName)} is not valid";
throw new OrleansConfigurationException(errorStr , e);
}
}
}
}
View on GitHub (pinned to fca799fa70)
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.
Example fix
// before
siloBuilder.AddAzureTableStorage("msgs", b =>
{
b.ConfigureStreamPartitioning(typeof(MyStream)); // forgot lease config
});
// after
siloBuilder.AddAzureBlobLeaseProvider("blobLeases", o =>
{
o.ConfigureBlobServiceClient(configuration.GetConnectionString("AzureStorage"));
}); Defensive patterns
Strategy: validation
Validate before calling
// Verify lease provider credentials are configured
var options = sp.GetRequiredService<IOptionsMonitor<AzureBlobLeaseProviderOptions>>().Get("blobLeases");
if (options.CreateClient is null && options.BlobServiceClient is null)
throw new InvalidOperationException("AzureBlobLeaseProvider 'blobLeases' has no BlobServiceClient configured."); Try / catch
try { await host.StartAsync(ct); }
catch (OrleansConfigurationException ex) when (ex.Message.Contains("No credentials specified"))
{
logger.LogCritical(ex, "Blob lease provider credentials missing — configure BlobServiceClient.");
throw;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Named option AzureBlobLeaseProviderOptions of name {name} is
- Configuration for AzureBlobLeaseProviderOptions {name} is in
- Configuration for AzureBlobLeaseProviderOptions is invalid.
- No credentials specified. Use the {options.GetType().Name}.C
- No credentials specified. Use the AzureBlobStorageOptions.Co
AI-assisted analysis of dotnet/orleans@fca799fa70 (2026-08-13).
Data as JSON: /api/errors/e3018b7635486fe0.
Report an issue: GitHub.