Connection strings overview

Connection strings are widely used in management commands, in the Kusto API, and in Kusto Query Language (KQL) queries.

Connection strings describe how to locate and interact with Kusto service endpoints as well as resources external to Kusto, such as blobs in the Azure Blob Storage service and Azure SQL Database databases.

Types of connection strings

The following table describes the types of connection string formats in Kusto.

Format Description
Kusto connection strings Describe how to communicate with a Kusto service endpoint. Kusto connection strings are modeled after ADO.NET connection strings.
Storage connection strings Describe how to point Kusto at an external storage service such as Azure Blob Storage and Azure Data Lake Storage.
SQL connection strings Describe how to point Kusto at an external SQL Server database for query or to export data to SQL. These connection strings adhere to the SqlClient connection strings specification.

Note

To learn how to specify security principals in connection strings, see Referencing security principals.

Authentication with connection strings

To interact with nonpublic external storage or external SQL Server databases, you need to specify authentication details as part of the connection string. For more information, see Storage authentication methods and SQL Server authentication methods.

Privacy and security

We recommend adding an 'h' prefix to any connection string that contains secrets. This practice ensures that the private information in the connection string is obfuscated in telemetry data.

The following table explains how to hide your private information using the 'h' string.

Goal Method Syntax
Hide the entire connection string Preface the connection string with 'h'. h"<connection_string>"
Hide only the secret part of the string Split the connection string into the resource location and the secret information and add the 'h' between the two. "<resource_location>"h"<secret>"