I have been trying to connect my nodejs application with azure playfab, then query the data using KQL. My code keep failing to run. Below is my code.
const KustoClient = require("azure-kusto-data").Client; const KustoConnectionStringBuilder = require("azure-kusto-data").KustoConnectionStringBuilder; const ClientRequestProperties = require("azure-kusto-data").ClientRequestProperties; const { v4: uuidv4 } = require('uuid'); const clusterConectionString = "https://insights.playfab.com"; const database = "Mydatabase"; const table = 'events.all'; const appId = null; const appKey = null; const authorityId = null; const kcs = KustoConnectionStringBuilder.withAadDeviceAuthentication(clusterConectionString, authorityId); const kustoClient = new KustoClient(kcs); start(); async function start() { try { const results = await kustoClient.execute(database, `['${table}'] | limit 1`); //console.log(JSON.stringify(results)); //console.log(results.primaryResults[0].toString()); //._rows } catch (error) { console.log(error); } }