SqlPackage universal authentication to Azure SQL fails with error "You can't sign in here with a personal account. Use your work or school account instead"
- SqlPackage or DacFx Version: 162.2.111.2
- .NET Framework (Windows-only) or .NET Core: 8.0.200
- Environment (local platform and source/target platforms): Windows 11/Azure
Steps to Reproduce:
- Publish DAC package to Azure SQL using universal authentication with command:
dotnet tool run sqlPackage /Action:Publish /SourceFile:XXX.dacpac /tsn:XXX.database.windows.net /tdn:XXX /tec:True /ua /tid:XXX.onmicrosoft.com
Observe browser window with authentication request is opened.
- Input valid login [email protected] and press "Next".
Observed behavior:
Error message "You can't sign in here with a personal account. Use your work or school account instead."
All inputs are valid and checked many times in different ways.
For instance, for sqlcmd universal authentication with the same inputs works as expected:
sqlcmd -S XXX.database.windows.net -d XXX -U [email protected] -G -I
Did this occur in prior versions? If not - which version(s) did it work in? It did not work in different way: browser window with authentication request was not opened and some error was reported.
(DacFx/SqlPackage/SSMS/Azure Data Studio): SqlPackage
If you enter the command for universal auth without the tenant Id, do you still get the error message for "You can't sign in here with a personal account. Use your work or school account instead."?
dotnet tool run sqlPackage /Action:Publish /SourceFile:XXX.dacpac /tsn:XXX.database.windows.net /tdn:XXX /tec:True /ua
Sure, double-checked it again. Of course, I have exhausted all possible workarounds before taking on the work to fill this bug report.