Hi all, I’m trying to set up a development environment to our Umbraco 13.12.1 site. The problem is that other developers always reach the “Install Umbraco” page despite connecting to an existing Umbraco database. When I’m running on the same branch, I progress to our index page as expected.
One difference I can come up with is that I am “Microsoft Entra admin” on the SQL Server resource in Azure. The other developers are in an Entra group that are db_owners on the database.
USE [ContosoDev]
CREATE USER [Website developers] FROM EXTERNAL PROVIDER WITH OBJECT_ID='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
ALTER ROLE db_owner ADD MEMBER [Website developers];
I verified that they can open a connection and query the database from another SQL Client. Here’s the connection string used in appsettings.Development.json:
"ConnectionStrings": {
"umbracoDbDSN": "Data Source=contoso-server.database.windows.net;Initial Catalog=ContosoDev;Encrypt=True;TrustServerCertificate=False;Authentication=Active Directory Default;"
}
For troubleshooting I added this snippet to Program.cs:
if (builder.Environment.IsDevelopment())
{
var connectionString = builder.Configuration.GetConnectionString("umbracoDbDSN");
Debug.WriteLine("=== DATABASE CONNECTION DIAGNOSTIC ===");
Debug.WriteLine($"Connection string found: {!string.IsNullOrEmpty(connectionString)}");
if (!string.IsNullOrEmpty(connectionString))
{
try
{
Debug.WriteLine($"Server: {new SqlConnectionStringBuilder(connectionString).DataSource}");
Debug.WriteLine($"Database: {new SqlConnectionStringBuilder(connectionString).InitialCatalog}");
Debug.WriteLine($"Authentication: {new SqlConnectionStringBuilder(connectionString).Authentication}");
Debug.WriteLine("Attempting to connect...");
using var connection = new SqlConnection(connectionString);
connection.Open();
Debug.WriteLine("✓ Database connection successful!");
using var command = connection.CreateCommand();
command.CommandText = "SELECT COUNT(*) FROM umbracoUser";
var userCount = command.ExecuteScalar();
Debug.WriteLine($"✓ Found {userCount} Umbraco users in database");
}
catch (Exception ex)
{
Debug.WriteLine($"✗ DATABASE CONNECTION FAILED!");
Debug.WriteLine($"Error: {ex.Message}");
Debug.WriteLine($"Type: {ex.GetType().Name}");
if (ex.InnerException != null)
{
Debug.WriteLine($"Inner Error: {ex.InnerException.Message}");
}
Debug.WriteLine("This will cause Umbraco to show the install screen.");
}
}
else
{
Debug.WriteLine("⚠ No connection string configured!");
}
Debug.WriteLine("=== END DIAGNOSTIC ===");
}
Then I verified that we get these lines in Visual Studio’s debug output (but are still reaching the “Install Umbraco” page):
=== DATABASE CONNECTION DIAGNOSTIC ===
Connection string found: True
Server: contoso-server.database.windows.net
Database: ContosoDev
Authentication: ActiveDirectoryDefault
Attempting to connect...
✓ Database connection successful!
✓ Found 11 Umbraco users in database
=== END DIAGNOSTIC ===