This property sets the value for TOKEN_AUTH parameter for the connection. The possible values for this property can be OracleTokenAuth.OciToken, OracleTokenAuth.Disabled, or OracleTokenAuth.OAuth.


// C#
public OracleTokenAuth TokenAuthentication { get; set; }


The value of this property will be part of connection pool manager identification so different values for this property will result in different connection pools.

Table 7-51 OracleTokenAuth Members

Member Name Description


Default value. Token authentication is DISABLED.


Token authentication is enabled for Oracle Identity and Access Management.


Token authentication enabled for Azure Active Directory.


  • An InvalidOperationException will be raised if

    • the connection is already open,

    • the value of the AccessToken property is not compatible with the type of token authentication being set,
    • TokenAuthentication is set to disabled and the AccessToken or TokenLocation properties are set,

    • or, TokenAuthentication is set to a value other than disabled, and the Credential property is set.

    • It can also be raised if the user or proxy information in the connection string is not compatible with token authentication.

  • OracleException if Credential is set.

  • OracleException if user id value is other than /.

  • OracleException if password, proxy user id and proxy password is set.


Only managed ODP.NET and ODP.NET Core can use this property.