Commit 6f212d4
committed
fix: use ActiveDirectoryDefault for -G with no username
When -G is passed without a username, sqlcmd was selecting ActiveDirectoryIntegrated (Windows SSPI), which requires an interactive logon token and fails in non-interactive contexts like Emacs inferior shells or CI jobs with 'Integrated Security not supported'.
Switch to ActiveDirectoryDefault, which walks the standard Azure credential chain (env vars, managed identity, Azure CLI, VS, then interactive browser). This matches the existing -G help text and works across Windows/Linux/macOS. Users who specifically need SSPI can still pass --authentication-method=ActiveDirectoryIntegrated.
Fixes #6991 parent a409f55 commit 6f212d4
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
522 | 543 | | |
523 | 544 | | |
524 | 545 | | |
| |||
0 commit comments