{"record":{"id":"8c68dc368981c989","repo":"dotnet/orleans","slug":"no-credentials-specified-use-the-gettype-name","errorCode":null,"errorMessage":"No credentials specified. Use the {GetType().Name}.ConfigureTableServiceClient method to configure the Azure Table Service client.","messagePattern":"No credentials specified\\. Use the (.+?)\\.ConfigureTableServiceClient method to configure the Azure Table Service client\\.","errorType":"validation","errorClass":"OrleansConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/Azure/Shared/Storage/AzureStorageOperationOptions.cs","lineNumber":189,"sourceCode":"            var delay = storagePolicyOptions.PauseBetweenOperationRetries > TimeSpan.Zero\n                ? storagePolicyOptions.PauseBetweenOperationRetries\n                : TimeSpan.FromSeconds(0.8);\n\n            var maxDelay = storagePolicyOptions.MaxPauseBetweenOperationRetries == Timeout.InfiniteTimeSpan\n                ? TimeSpan.FromMinutes(1)\n                : storagePolicyOptions.MaxPauseBetweenOperationRetries;\n\n            retryOptions.Mode = RetryMode.Exponential;\n            retryOptions.Delay = delay;\n            retryOptions.MaxDelay = maxDelay >= delay ? maxDelay : delay;\n            retryOptions.MaxRetries = Math.Max(0, storagePolicyOptions.MaxOperationRetries);\n        }\n\n        internal void Validate(string? name)\n        {\n            if (CreateClient is null)\n            {\n                throw new OrleansConfigurationException($\"No credentials specified. Use the {GetType().Name}.{nameof(ConfigureTableServiceClient)} method to configure the Azure Table Service client.\");\n            }\n\n            try\n            {\n                AzureTableUtils.ValidateTableName(TableName);\n            }\n            catch (Exception ex)\n            {\n                throw GetException($\"{nameof(TableName)} is not valid.\", ex);\n            }\n\n            Exception GetException(string message, Exception? inner = null) =>\n                new OrleansConfigurationException($\"Configuration for {GetType().Name} {name} is invalid. {message}\", inner!);\n        }\n    }\n\n    public class AzureStorageOperationOptionsValidator<TOptions> : IConfigurationValidator where TOptions : AzureStorageOperationOptions\n    {","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/Azure/Shared/Storage/AzureStorageOperationOptions.cs#L171-L207","documentation":"Thrown by AzureStorageOperationOptions.Validate() when CreateClient is null — i.e. no credentials/client were ever configured for the Azure Table Service. Validate() runs during silo/client startup, so this surfaces as a blocking OrleansConfigurationException that prevents the host from booting. The message points you to the (now-obsolete) ConfigureTableServiceClient methods, but the recommended fix is to set TableServiceClient directly.","triggerScenarios":"Registering an Azure Table-backed storage/clustering/reminders/streaming provider without ever calling any ConfigureTableServiceClient overload or assigning TableServiceClient. Also when a custom AzureStorageOperationOptions subclass leaves the client unassigned.","commonSituations":"Forgot to wire credentials for Azure Table storage; DI bound AzureStorageOperationOptions but no post-configuration set the client; migration where the Configure call was removed but the property assignment was not added.","solutions":["Set options.TableServiceClient to a configured TableServiceClient instance (preferred), or call a ConfigureTableServiceClient overload.","Ensure the assignment happens during startup configuration (e.g. in a PostConfigure or builder callback) before Validate runs.","Confirm the right AzureStorageOperationOptions instance is the one being registered."],"exampleFix":"// before\nsilo.AddAzureTableGrainStorage(\"Default\", o => { o.TableName = \"grainstate\"; /* no client! */ });\n// after\nsilo.AddAzureTableGrainStorage(\"Default\", o =>\n{\n    o.TableName = \"grainstate\";\n    o.TableServiceClient = new TableServiceClient(connectionString);\n});","handlingStrategy":"validation","validationCode":"void EnsureConfigured(AzureStorageOperationOptions o)\n{\n    if (o.TableServiceClient is null && o.CreateClient is null)\n        throw new OrleansConfigurationException($\"{nameof(AzureStorageOperationOptions)} has no TableServiceClient configured.\");\n}","typeGuard":"static bool IsClientConfigured(AzureStorageOperationOptions o) => o.TableServiceClient is not null || o.CreateClient is not null;","tryCatchPattern":"catch (OrleansConfigurationException ex) when (ex.Message.Contains(\"No credentials specified\")) { /* wire TableServiceClient before startup */ }","preventionTips":["Always assign TableServiceClient in the storage/clustering/reminders builder callback.","Add a startup health check that validates each AzureStorageOperationOptions.","After removing obsolete Configure calls, add the property assignment."],"tags":["orleans","azure-storage","azure-table","configuration","startup","credentials"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}