Azure Portal import of a .bacpac file fails with an "ImportExportJobError," indicating database import failure. The error message lacks detail, but warnings suggest object conflicts in the target database. Retrying the import through the portal doesn't resolve the issue. To diagnose the problem, the SQLPackage.exe tool can be used with specific parameters. The diagnostic file reveals a "Principal could not be created" error during script execution. The failure stems from attempting to create an Entra user with SQL authentication. This fails because only Entra accounts can create other Entra users in this context. If the source database only has contained Entra users, the issue is typically avoided. The problem occurs when the exported database contains Entra server logins and corresponding users in the user database. Mitigating this issue involves using a Microsoft Entra account to initiate the import. Alternatively, make Entra users "contained" before export and use SQL authentication for import. This second method helps if your Entra account uses MFA, allowing import via SQL authentication.
techcommunity.microsoft.com
techcommunity.microsoft.com
