How to fix "contained database authentication" when importing an Azure SQL Database .bacpac into local SQL Server Express
If your bacpac import into a local SQL Server Express instance fails with Msg 12824, the fix is one sp_configure setting and a clean re-import. It takes about two minutes. I hit this while setting up the new Umbraco v17 site on my laptop. I took a .bacpac export of the latest live database and tried to restore it into SQL Server 2025 Express ( MSSQL17.SQLEXPRESS ), using Import Data-tier Application in SQL Server Management Studio with Windows Authentication. The import ran for a while, then stopped with "Could not import package". The error The important lines are the two SQL72014 errors. The SQL72012 warnings about _Data and _Log files are harmless leftovers from the failed attempt. Error SQL72014: Framework Microsoft SqlClient Data Provider: Msg 12824, Level 16, State 1, Line 5 The sp_configure value 'contained database authentication' must be set to 1 in order to alter a contained database. Error SQL72045: Script execution error. The executed script: ALTE...