microsoft / microsoft/DacFx

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"

Open
#422 2 comments 0 reactions 1 assignee Claimed by @dzsquared View on GitHub
bug
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."
![image](https://github.com/microsoft/DacFx/assets/6974233/70af3a83-1856-41be-b166-b8af1d8aa4f2)

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](https://github.com/microsoft/DacFx/assets/6974233/84a28d72-fd1d-4a77-bcb9-00f0c001297d)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.