Skip to content

Commit 86073c5

Browse files
docs: fix inaccurate ActiveDirectoryIntegrated description and improve auth docs
- Revert ActiveDirectoryIntegrated to accurate fallback description (driver still falls back to DefaultAzureCredential per source comment) - Add -f (codepage) to unimplemented switches table - Replace generic auth method descriptions with driver-verified details including actual env var names and connection parameters
1 parent 7577d45 commit 86073c5

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ Most switches from the original ODBC-based `sqlcmd` have been implemented. The f
166166

167167
| Switch | Description |
168168
|--------|-------------|
169+
| `-f` | Input/output code page |
169170
| `-j` | Print raw error messages |
170171
| `-p[1]` | Print statistics (optional colon format) |
171172

@@ -222,7 +223,7 @@ To use AAD auth, you can use one of two command line switches:
222223

223224
`ActiveDirectoryIntegrated`
224225

225-
This method uses integrated Windows authentication. On Windows, it uses the current user's credentials. On Linux and macOS, it uses Kerberos authentication (requires a properly configured Kerberos environment).
226+
This method is not fully implemented in the go-mssqldb driver and currently falls back to `ActiveDirectoryDefault`.
226227

227228
`ActiveDirectoryPassword`
228229

@@ -254,13 +255,13 @@ This method uses the device code flow for authentication. It displays a code tha
254255

255256
The following authentication methods are also supported via `--authentication-method`:
256257

257-
- `ActiveDirectoryWorkloadIdentity` - For workload identity federation scenarios
258-
- `ActiveDirectoryClientAssertion` - For client assertion authentication
259-
- `ActiveDirectoryAzurePipelines` - For Azure Pipelines service connections
260-
- `ActiveDirectoryEnvironment` - Uses environment variables for authentication
261-
- `ActiveDirectoryAzureDeveloperCli` - Uses Azure Developer CLI credentials
262-
- `ActiveDirectoryServicePrincipalAccessToken` - Uses a pre-obtained access token
263-
- `SqlPassword` - SQL Server authentication (same as using `-U` and `-P` without `-G`)
258+
- `ActiveDirectoryWorkloadIdentity` - Uses federated token authentication for Kubernetes or GitHub Actions workloads; optionally provide `client_id@tenant_id` as username and `tokenfilepath` parameter (defaults to `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_FEDERATED_TOKEN_FILE` env vars)
259+
- `ActiveDirectoryClientAssertion` - Authenticates with a signed JWT assertion instead of a client secret
260+
- `ActiveDirectoryAzurePipelines` - Authenticates using an Azure Pipelines service connection; requires `client_id@tenant_id` as username, plus `serviceconnectionid` and `systemtoken` connection parameters (or `AZURESUBSCRIPTION_CLIENT_ID`, `AZURESUBSCRIPTION_SERVICE_CONNECTION_ID`, `SYSTEM_ACCESSTOKEN` env vars)
261+
- `ActiveDirectoryEnvironment` - Selects a credential type automatically based on which `AZURE_*` environment variables are set (client secret, certificate, or username/password)
262+
- `ActiveDirectoryAzureDeveloperCli` - Uses credentials from `azd auth login` (Azure Developer CLI)
263+
- `ActiveDirectoryServicePrincipalAccessToken` - Uses a pre-obtained bearer token; set `SQLCMDPASSWORD` to the access token value
264+
- `SqlPassword` - SQL Server authentication (equivalent to `-U` and `-P` without `-G`)
264265

265266
#### Environment variables for AAD auth
266267

0 commit comments

Comments
 (0)