The driver supports authenticating to the server using an access token obtained from Microsoft Entra ID (Azure Active Directory). Configuring Entra ID access token authentication is recommended using a Properties or DataSource object only. The driver encrypts data using TLS/SSL when using Entra ID access token authentication; therefore, the EncryptionMethod property is automatically set to SSL by the driver when Entra ID authentication is enabled.
Note: If an access token is specified, it will take precedence over other authentication methods.
To configure the driver to use Entra ID access token authentication:
  • Set the AuthenticationMethod property to EntraIDAccessToken.
  • Set the EntraAccessToken property to specify the access token that you have obtained from Entra ID.
  • Specify values for minimum required properties for establishing a connection.
    • Set the ServerName property to specify either the IP address in IPv4 or IPv6 format, or the server name for your Azure server.
    • Set the PortNumber property to specify the TCP port of the primary database server that is listening for connections to the database.

For example, the following is a connection string with only the required properties for making a connection using Entra ID access token authentication.

Connection conn = DriverManager.getConnection 
("jdbc:datadirect:oracle://server3:1521;AuthenticationMethod=entraIDaccesstoken;
EntraAccessToken=ab-cdefghijklmnop_123456789");