How to ingest to kusto from local file with authentication through manage identity

63 Views Asked by At

Does manage identity auth support ingesting local csv file to Kusto? If it does, is there any sample code that you can refer me to?

If it doesn't, does subject name and issue certificate auth support ingest in Kusto from local file? if it does, Is there any sample code that can help me figure out how to authenticate to Kusto with ApplicationCertificateBlob and ingest local file to Kusto? While I was testing the below code to authenticate with ApplicationCertificateBlob I got an error which says that Application Key is missing in connection string which I am not sure what Application Key is and why it's needed to auth with ApplicationCertificateBlob.

new KustoConnectionStringBuilder(string.Format(KustoConnectionString, clusterName, dbName)) { FederatedSecurity = true, ApplicationClientId = clientId, Authority = tenantId, ApplicationCertificateBlob = certificate, ApplicationCertificateSendX5c = true };

1

There are 1 best solutions below

0
Balaji On

How to ingest to kusto from local file with authentication through manage identity

Below is one of the approach to ingest .csv file from local file to kusto table you can follow the below steps:

  • Store the .csv file into the Azure storage account. In my case i stored in Azure Blob Storage as you can see below: enter image description here

  • Make Allow Blob anonymous access to Enabled and change access level to Container as shown below: enter image description here

  • As the data must be ingested into kusto by using Managed Identity, make sure to provide Storage Blob Data Contributor role to that respective Managed Identity as shown below: enter image description here

Try below query to ingest data into kusto table:

.ingest into table <TableName> ('https://<StorageName>.blob.core.windows.net/adxcont/sampleFile.csv;managed_identity=*****')

Output: enter image description here