The documented Kerberos-to-Microsoft Entra authentication flow contains no dependency on a SQL-authenticated login or its password, so keep LegacyLogin enabled with its known working password and open an Azure SQL Managed Instance support case before disabling, changing, or dropping it again.
In this flow, the client submits a Kerberos ticket to SQL Managed Instance, which exchanges it with Microsoft Entra ID for a token; an unrelated SQL login is not a documented input ^1^. Your controlled reproduction—combined with the dependency checks already completed—is therefore an undocumented coupling, not a supported SQL-login dependency with a documented self-service removal procedure.
Escalate the reproducible login coupling
Do not drop and recreate the login as a diagnostic step. Give Microsoft Support:
- MI resource name and region, affected database names, and precise UTC test windows.
- The exact
ALTER LOGIN operation and the times at which failures begin and recover.
- SQL error-log rows including the 18456 state. States 102–111 and 132–133 identify Entra failures; an unlisted state can indicate unexpected internal processing ^2^.
- Extended Events capturing
error_reported for 18456, login, client_hostname, client_app_name, and connection identifiers during one controlled test. Creating an XE session requires ALTER ANY EVENT SESSION ^3^.
- Evidence that the affected principal is not
AzureSQLConnectivityChecker. MI’s automatic connectivity test intentionally generates 18456 approximately every ten seconds under that login; it does not explain failures naming your service accounts ^4^.
Investigate the independent intermittent failures
The failures occurring while LegacyLogin is unchanged could have a separate Kerberos/incoming-trust cause.
- Capture tickets in the failing IIS worker identity’s security context. Tickets from an administrator’s interactive session do not establish what the application-pool identity has cached. During an incident, have the Windows/IIS administrator capture equivalent
klist results from the worker-process identity context:
klist get krbtgt/kerberos.microsoftonline.com
klist get MSSQLSvc/<mi-name>.<dns-zone>.database.windows.net:1433
klist
The SQL service ticket should be from the kerberos.microsoftonline.com realm ^5^.
- Branch on the returned Kerberos error:
- Validate the incoming trust and GPO using domain/enterprise and Hybrid Identity administrator credentials.
Get-AzureADKerberosServer should show CloudTrustDisplay as Microsoft.AzureAD.Kdc.Service.TrustDisplay. If the KDC proxy policy is absent or incorrect, enable: Administrative Templates → System → Kerberos → Specify KDC proxy servers for Kerberos clients Add this mapping, preserving the documented spaces:
- Name:
KERBEROS.MICROSOFTONLINE.COM
- Value:
<https login.microsoftonline.com:443:<tenant-id>/kerberos />
^6^
- Validate MI identity configuration with an Entra administrator: Azure portal → SQL managed instance → Identity must have its system-assigned service principal enabled, and
<instance-name> principal must have admin consent ^7^.
No supplied Microsoft documentation identifies an hourly authentication task that would explain :00–:03. Treat that timing as correlation evidence, not an established cadence. Include it in the support case and correlate it with ticket results, Conditional Access logs, domain-controller events, and exact UTC timestamps. Kerberos key rotation is a separate documented operation whose changes can take several hours to propagate—not an hourly process ^6^.
Client-side containment
- Microsoft documents setting pooled connection lifetime to less than five minutes for this feature, preventing reuse after security-cache invalidation ^5^. The cited MI guidance does not specify the provider-specific connection-string keyword or units; confirm those against the exact
Microsoft.Data.SqlClient or System.Data.SqlClient version before deployment rather than assuming the syntax is identical.
- For EF Core, enable bounded execution-strategy retries:
options.UseSqlServer(connectionString, sql =>
sql.EnableRetryOnFailure(
maxRetryCount: 3,
maxRetryDelay: TimeSpan.FromSeconds(15),
errorNumbersToAdd: null));
This does not establish that every 18456 is retryable. Add authentication errors only after identifying a narrowly scoped transient signature; generic 18456 retries can mask permanent configuration or credential failures ^8^.
- EF6 can enable
SqlAzureExecutionStrategy, but its documented built-in transient list does not include 18456:
public sealed class EfConfiguration : DbConfiguration
{
public EfConfiguration() =>
SetExecutionStrategy(
"System.Data.SqlClient",
() => new SqlAzureExecutionStrategy(3, TimeSpan.FromSeconds(15)));
}
^9^
Use bounded backoff with jitter, log every retry, and retry an entire transaction rather than an individual statement within it ^10^.
References
- How Windows Authentication for Azure SQL Managed Instance is implemented with Microsoft Entra ID and Kerberos
- MSSQLSERVER_18456
- Run a trace against Azure SQL Managed Instance using Windows Authentication for Microsoft Entra principals
- Automatic internal connectivity tests for Azure SQL Managed Instance
- Troubleshoot Windows Authentication for Microsoft Entra principals on ...
- How to set up Windows Authentication for Microsoft Entra ID with the ...
- Configure Azure SQL Managed Instance for Windows Authentication for Microsoft Entra ID
- Implement resilient Entity Framework Core SQL connections
- SqlAzureExecutionStrategy Class-Definition
- Configurable retry logic in SqlClient