{"record":{"id":"c564837b8e14116e","repo":"dbt-labs/dbt-core","slug":"authentication-method-not-implemented","errorCode":null,"errorMessage":"authentication method {} not implemented","messagePattern":"authentication method (.+?) not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/dbt-auth/src/sqlserver/mod.rs","lineNumber":193,"sourceCode":"            let access_token = config.require_str(\"access_token\")?;\n            // The driver rejects an empty token with a message that names the `password`\n            // URI parameter, which does not exist in the user's profile. Fail earlier with\n            // the profile field name instead.\n            if access_token.is_empty() {\n                return Err(AuthError::config(\n                    \"`access_token` must not be empty when using ActiveDirectoryAccessToken authentication\",\n                ));\n            }\n            Ok(SQLServerAuthIR::ActiveDirectoryAccessToken { access_token })\n        }\n        \"ActiveDirectoryPassword\" => Ok(SQLServerAuthIR::ActiveDirectoryPassword {\n            user: config.require_str(\"UID\")?,\n            password: config.require_str(\"PWD\")?,\n            client_id: config.require_str(\"client_id\")?,\n        }),\n        \"environment\" => Ok(SQLServerAuthIR::ActiveDirectoryEnvironment),\n        \"ActiveDirectoryInteractive\" | \"ActiveDirectoryIntegrated\" | \"CLI\" | \"auto\" => {\n            unimplemented!(\"authentication method {} not implemented\", authentication)\n        }\n        _ => Err(AuthError::config(format!(\n            \"Invalid authentication method: {authentication} must be one of: [ActiveDirectoryServicePrincipal, ActiveDirectoryAccessToken, ActiveDirectoryPassword, environment]\"\n        ))),\n    }\n}\n\nfn apply_connection_args(\n    config: &AdapterConfig,\n    mut builder: DatabaseBuilder,\n    _warning_printer: &dyn AuthWarningPrinter,\n) -> Result<DatabaseBuilder, AuthError> {\n    let host = config.require_str(\"host\")?;\n    let port = config\n        .get_string(\"port\")\n        .unwrap_or_else(|| DEFAULT_PORT.into());\n\n    // both \"mssql://\" and \"sqlserver://\" are supported by the driver,","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-auth/src/sqlserver/mod.rs#L175-L211","documentation":"When parsing a SQL Server profile's `authentication` setting, `parse_auth` matches the configured string against supported methods (ActiveDirectoryServicePrincipal, ActiveDirectoryAccessToken, ActiveDirectoryPassword, environment). A few legacy/alternative method names — ActiveDirectoryInteractive, ActiveDirectoryIntegrated, CLI, auto — are recognized but explicitly not implemented, so the code panics with `unimplemented!` naming the method. This is distinct from an invalid method name, which returns a config error instead.","triggerScenarios":"Calling `configure` on a SQLServer profile whose `authentication` key is set to `ActiveDirectoryInteractive`, `ActiveDirectoryIntegrated`, `CLI`, or `auto`.","commonSituations":"Users copy connection settings from Microsoft's SQL Server/ODBC docs or the pyodbc/Azure docs, which commonly list `ActiveDirectoryInteractive` or `ActiveDirectoryIntegrated` as valid Azure AD auth modes; these names are valid for Microsoft tooling but not yet supported by this Rust SQL Server auth implementation.","solutions":["Change the profile's `authentication` value to a supported method: ActiveDirectoryServicePrincipal, ActiveDirectoryAccessToken, ActiveDirectoryPassword, or environment.","For interactive Azure AD login, obtain a token out-of-band (e.g., `az account get-access-token`) and use `ActiveDirectoryAccessToken` with that token instead.","If you need the interactive/integrated methods, implement them in `crates/dbt-auth/src/sqlserver/mod.rs` replacing the `unimplemented!` arm."],"exampleFix":"// before (profile config)\nauthentication: ActiveDirectoryInteractive\n// after\nauthentication: ActiveDirectoryServicePrincipal","handlingStrategy":"validation","validationCode":"const SUPPORTED: [&str; 4] = [\n    \"ActiveDirectoryServicePrincipal\",\n    \"ActiveDirectoryAccessToken\",\n    \"ActiveDirectoryPassword\",\n    \"environment\",\n];\nfn validate_auth_method(m: &str) -> Result<(), String> {\n    const UNSUPPORTED: [&str; 4] = [\"ActiveDirectoryInteractive\", \"ActiveDirectoryIntegrated\", \"CLI\", \"auto\"];\n    if UNSUPPORTED.contains(&m) {\n        return Err(format!(\"method {m} is recognized but not implemented; use one of {SUPPORTED:?}\"));\n    }\n    if !SUPPORTED.contains(&m) {\n        return Err(format!(\"invalid authentication method {m}\"));\n    }\n    Ok(())\n}","typeGuard":"fn is_supported_sqlserver_auth(m: &str) -> bool {\n    matches!(m, \"ActiveDirectoryServicePrincipal\" | \"ActiveDirectoryAccessToken\" | \"ActiveDirectoryPassword\" | \"environment\")\n}","tryCatchPattern":"// Error surfaces as AuthError (config variant) only for invalid names; the\n// unsupported-but-recognized names panic. Validate the profile before configure():\nlet auth = profile.get(\"authentication\").and_then(|v| v.as_str()).unwrap_or(\"\");\nif matches!(auth, \"ActiveDirectoryInteractive\" | \"ActiveDirectoryIntegrated\" | \"CLI\" | \"auto\") {\n    return Err(anyhow!(\"authentication method {auth} is not supported; use ActiveDirectoryServicePrincipal/AccessToken/Password/environment\"));\n}\nlet auth_ir = sqlserver_auth.configure(config).context(\"SQL Server auth configuration failed\")?;","preventionTips":["Use only the four supported authentication values in SQL Server profiles.","For Azure AD interactive login, pre-fetch a token (e.g., az account get-access-token) and use ActiveDirectoryAccessToken.","Lint team profiles for legacy pyodbc-style auth names before migrating to this crate."],"tags":["panic","unimplemented","authentication","sqlserver","azure-ad"],"backgroundTag":"unsupported-enum-value","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}