Attribute

AuthenticationMethod (AM)

Purpose

Specifies the method the driver uses to authenticate the user to the server when a connection is established. If the specified authentication method is not supported by the database server, the connection fails and the driver generates an error.

Important: When Kerberos is enabled, if the database user name differs from the domain user name, you are required to pass the database user name via the User Name (LogonID) option in the datasource or connection string.

Valid Values

0 | 4 | 13 | 17 | 18 | 36

Behavior

If set to 0 (User ID/Password), the driver uses user ID/password authentication. The driver supports the MD5, SCRAM-SHA-256 and SCRAM-SHA-256-PLUS password hashing mechanisms. During connection, the driver detects and uses the most secure method supported by the server. You must also provide a value for the User Name (LogonID) and Password (Password) options.

If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both Windows Active Directory Kerberos and MIT Kerberos environments.

If set to 13 (Entra ID Password), the driver authenticates using an Entra ID user name and password when connecting to a Azure SQL Database data store. TLS/SSL encryption is enabled (EncryptionMethod=1) when using this method, regardless of the value specified for EncryptionMethod.
Important: Before enabling Entra ID Password authentication, see "Microsoft Entra ID Authentication" for requirements and additional information.

If set to 17 (SSL Verify CA), the driver uses certificate-based authentication, which verifies client SSL certificate to authenticate the client to the server.

If set to 18 (SSL Verify Full), the driver uses certificate-based authentication, which verifies both client SSL certificate and host name to authenticate the client to the server.

If set to 36 (Entra ID Service Principal), the driver authenticates using an Entra ID service principal when establishing a connection to an Azure SQL Database data store. TLS/SSL encryption is enabled (EncryptionMethod=1) when using this method, regardless of the value specified for EncryptionMethod.
Note: Before enabling Entra ID Service Principal authentication, see "Microsoft Entra ID Authentication" for requirements and additional information.

Default

0 (User ID/Password)

GUI Tab

Security tab