· Azure CMS13

Optimizely CMS 13.2: Cannot find an authentication provider for 'ActiveDirectoryManagedIdentity'

After upgrading an Optimizely CMS 13 site from 13.1.3 to 13.2.0, everything worked on my machine. When I deployed to Azure, the site crashed at startup.

Unhandled exception. System.ArgumentException:
Cannot find an authentication provider for 'ActiveDirectoryManagedIdentity'.
Install the 'Microsoft.Data.SqlClient.Extensions.Azure' NuGet package to use
Active Directory (Entra ID) authentication methods.

Why did this happen?

The NuGet package EPiServer.Cms.Core 13.2.0 raised its dependency on Microsoft.Data.SqlClient from 6.x to 7.x. In SqlClient 7, Microsoft moved the Entra ID authentication providers out of the core package and into a separate package: Microsoft.Data.SqlClient.Extensions.Azure.

SqlClient 6 still shipped with Azure.Identity and friends. SqlClient 7 does not.

If your connection string uses any Entra ID method, like Authentication=Active Directory Managed Identity, Active Directory Default or Active Directory Interactive, it's still valid. But at runtime SqlClient can no longer find a provider to handle it.

Why it worked locally?

Locally I connected to the database with plain SQL authentication (user name and password). In Azure the site used Managed Identity. So the upgrade broke only the environment that uses Entra ID, and I didn't find out until after the deploy.

The fix

Add the package explicitly:

<PackageReference Include="Microsoft.Data.SqlClient.Extensions.Azure" Version="7.1.0" />

This is Microsoft's intended solution, not a workaround. Entra ID support is now opt-in.

A final tip

If your environments use different authentication methods, test the upgrade in one that uses Entra ID before you deploy to production.