microsoft / DacFx

SQL Server database schema validation, deployment, and upgrade runtime. Enables declarative database development and database portability across SQL Server versions and environments.
https://aka.ms/sqlpackage-ref
MIT License
292 stars 15 forks source link

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" #422

Open GennadyGS opened 3 months ago

GennadyGS commented 3 months ago

Steps to Reproduce:

  1. 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.

  2. Input valid login XXX@outlook.com and press "Next".

Observed behavior: Error message "You can't sign in here with a personal account. Use your work or school account instead." image

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 XXX@outlook.com -G -I

image

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

dzsquared commented 3 months ago

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
GennadyGS commented 3 months ago

Sure, double-checked it again. Of course, I have exhausted all possible workarounds before taking on the work to fill this bug report.