SqlConnection.AccessToken Property

Definition

Gets or sets the access token for the connection.

public:
 property System::String ^ AccessToken { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(false)]
public string AccessToken { get; set; }
public string AccessToken { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.AccessToken : string with get, set
member this.AccessToken : string with get, set
Public Property AccessToken As String

Property Value

The access token for the connection.

Attributes

Remarks

The AccessToken is a part of the connection pool key. Care should be taken when using this property to manage your own access token. The application is responsible for knowing when the token expires and connections from the pool should no longer be used.

If you set a minimum pool size > 0 along with AccessToken, you must call ClearPool after the access token expires to ensure the connection pool doesn't maintain those connections indefinitely.

Applies to