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"
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
- 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:**
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."

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
```

**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
Contributor guide
Assessment
This issue has not been assessed yet.