Skip to content

Commit ce9dc53

Browse files
committed
feat(azure-data-explorer): run as a saved Microsoft app credential
Adds azure_data_explorer_v2, a credential-only successor whose picker selects a Microsoft app credential (client secret, certificate, or keyless federated credential) in place of the inline tenant ID, client ID, and client secret. The executor authorizes the credential and the operation mints a token for the cluster each call names: the audience is the allowlisted cluster (or resource override) host as https://<host>, and the credential's cloud must be one that host belongs to, so a US Government or China cluster takes a matching national-cloud credential. Inline secrets are never read on that path. The legacy block keeps its inline fields and behavior and is marked legacy with azure_data_explorer_v2 as its replacement. The connect dialog gains a Cloud choice; a global credential's payload and stored secret are unchanged.
1 parent 5f42048 commit ce9dc53

37 files changed

Lines changed: 776 additions & 155 deletions

‎apps/docs/components/ui/icon-mapping.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
361361
athena_v2: AthenaIcon,
362362
attio: AttioIcon,
363363
azure_data_explorer: AzureDataExplorerIcon,
364+
azure_data_explorer_v2: AzureDataExplorerIcon,
364365
azure_devops: AzureIcon,
365366
azure_devops_v2: AzureIcon,
366367
bitbucket: BitbucketIcon,

‎apps/docs/content/docs/integrations/azure_data_explorer.mdx‎

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Azure Data Explorer
33
description: Query and manage Azure Data Explorer (Kusto) clusters with KQL
44
integration:
5-
type: "azure_data_explorer"
5+
type: "azure_data_explorer_v2"
66
color: "#FFFFFF"
77
---
88

@@ -32,7 +32,7 @@ In Sim, this integration gives your agents both halves:
3232
- **Debug the pipeline** — list ingestion failures with their error codes and root causes, and check the state of a long-running operation
3333
- **Run any management command** — the escape hatch for policies, mappings, and anything else on the control plane
3434

35-
Authentication uses a **Microsoft Entra service principal** (an app registration with a tenant ID, client ID, and client secret) rather than an interactive sign-in, so scheduled and unattended workflows keep working without anyone logging in. Grant that principal access to the database with `.add database <DATABASE> viewers ('aadapp=<clientId>;<tenantId>')` — use `viewers` for read-only agents, and `ingestors` or `users` only when a workflow needs to write.
35+
Authentication uses a **Microsoft Entra app registration** rather than an interactive sign-in, so scheduled and unattended workflows keep working without anyone logging in. Select a saved [Microsoft app credential](/integrations/microsoft-app-credentials), which signs in with a client secret, a certificate, or a keyless federated credential; choose the credential's cloud to match the cluster (a `kusto.usgovcloudapi.net` cluster needs a US Government credential, a `kusto.chinacloudapi.cn` one a China credential). Sim mints a token for the cluster itself (`https://<cluster host>`) on each run. Grant the app access to the database with `.add database <DATABASE> viewers ('aadapp=<clientId>;<tenantId>')` — use `viewers` for read-only agents, and `ingestors` or `users` only when a workflow needs to write. Workflows built before saved credentials keep their inline tenant ID, client ID, and client secret.
3636

3737
A few things worth knowing before you build:
3838

@@ -46,7 +46,7 @@ A few things worth knowing before you build:
4646

4747
## Use the block [#usage-instructions]
4848

49-
Run Kusto Query Language queries against Azure Data Explorer and Fabric Eventhouse clusters, discover databases, tables, and schemas, push small batches of rows inline, and run management commands. Authenticates with a Microsoft Entra service principal using client credentials, so no interactive sign-in is needed.
49+
Run Kusto Query Language queries against Azure Data Explorer and Fabric Eventhouse clusters, discover databases, tables, and schemas, push small batches of rows inline, and run management commands. Runs as a Microsoft app credential: an app registration signing in with a client secret, a certificate, or a keyless federated credential, in the global cloud or a national cloud, so no interactive sign-in is needed.
5050

5151
## Actions
5252

@@ -61,9 +61,6 @@ Run a Kusto Query Language (KQL) query against an Azure Data Explorer database a
6161
| Parameter | Type | Required | Description |
6262
| --------- | ---- | -------- | ----------- |
6363
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
64-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
65-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
66-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
6764
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
6865
| `database` | string | Yes | Database to run the query against |
6966
| `query` | string | Yes | KQL query text \(e.g., StormEvents \| where State == "FLORIDA" \| summarize count\(\) by EventType\) |
@@ -98,9 +95,6 @@ Run an Azure Data Explorer management command (a control command starting with "
9895
| Parameter | Type | Required | Description |
9996
| --------- | ---- | -------- | ----------- |
10097
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
101-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
102-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
103-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
10498
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
10599
| `command` | string | Yes | Management command text, starting with "." \(e.g., .show table Events details\) |
106100
| `database` | string | No | Database context for the command. Required for all commands except cluster-level ones such as .show databases |
@@ -133,9 +127,6 @@ List the databases on an Azure Data Explorer cluster that the service principal
133127
| Parameter | Type | Required | Description |
134128
| --------- | ---- | -------- | ----------- |
135129
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
136-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
137-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
138-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
139130
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
140131

141132
#### Output
@@ -167,9 +158,6 @@ List the tables in an Azure Data Explorer database, with their folder and docstr
167158
| Parameter | Type | Required | Description |
168159
| --------- | ---- | -------- | ----------- |
169160
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
170-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
171-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
172-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
173161
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
174162
| `database` | string | Yes | Database whose tables should be listed |
175163

@@ -202,9 +190,6 @@ Read the column schema of an Azure Data Explorer table in CSL form (e.g., "Times
202190
| Parameter | Type | Required | Description |
203191
| --------- | ---- | -------- | ----------- |
204192
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
205-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
206-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
207-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
208193
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
209194
| `database` | string | Yes | Database containing the table |
210195
| `table` | string | Yes | Table whose schema should be read |
@@ -232,9 +217,6 @@ Read the full schema of an Azure Data Explorer database as a flat list of every
232217
| Parameter | Type | Required | Description |
233218
| --------- | ---- | -------- | ----------- |
234219
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
235-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
236-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
237-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
238220
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
239221
| `database` | string | Yes | Database whose schema should be read |
240222

@@ -266,9 +248,6 @@ Read size, row count, hot-cache footprint, and effective policies for a table
266248
| Parameter | Type | Required | Description |
267249
| --------- | ---- | -------- | ----------- |
268250
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
269-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
270-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
271-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
272251
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
273252
| `database` | string | Yes | Database to read table details from |
274253
| `table` | string | No | Table to describe. Omit to describe every table in the database |
@@ -301,9 +280,6 @@ List the stored functions in an Azure Data Explorer database, with their paramet
301280
| Parameter | Type | Required | Description |
302281
| --------- | ---- | -------- | ----------- |
303282
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
304-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
305-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
306-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
307283
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
308284
| `database` | string | Yes | Database whose stored functions should be listed |
309285

@@ -336,9 +312,6 @@ Push rows directly into an Azure Data Explorer table with .ingest inline. Data i
336312
| Parameter | Type | Required | Description |
337313
| --------- | ---- | -------- | ----------- |
338314
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
339-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
340-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
341-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
342315
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
343316
| `database` | string | Yes | Database containing the target table |
344317
| `table` | string | Yes | Table to ingest into. Its schema is the assumed schema for the data |
@@ -374,9 +347,6 @@ Materialize the result of a KQL query into a table with .set, .append, .set-or-a
374347
| Parameter | Type | Required | Description |
375348
| --------- | ---- | -------- | ----------- |
376349
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
377-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
378-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
379-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
380350
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
381351
| `database` | string | Yes | Database containing the target table |
382352
| `table` | string | Yes | Table to ingest the query result into |
@@ -413,9 +383,6 @@ Create a table in an Azure Data Explorer database from a CSL column schema. Succ
413383
| Parameter | Type | Required | Description |
414384
| --------- | ---- | -------- | ----------- |
415385
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
416-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
417-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
418-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
419386
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
420387
| `database` | string | Yes | Database to create the table in |
421388
| `table` | string | Yes | Name of the table to create |
@@ -450,9 +417,6 @@ Drop a table from an Azure Data Explorer database. The table becomes unavailable
450417
| Parameter | Type | Required | Description |
451418
| --------- | ---- | -------- | ----------- |
452419
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
453-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
454-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
455-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
456420
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
457421
| `database` | string | Yes | Database containing the table |
458422
| `table` | string | Yes | Name of the table to drop |
@@ -487,9 +451,6 @@ List ingestion failures recorded for a database, with the failing table, error c
487451
| Parameter | Type | Required | Description |
488452
| --------- | ---- | -------- | ----------- |
489453
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
490-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
491-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
492-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
493454
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
494455
| `database` | string | Yes | Database whose ingestion failures should be listed |
495456
| `operationId` | string | No | Limit results to a single ingestion operation ID |
@@ -522,9 +483,6 @@ Check the state of administrative operations on a cluster, such as an async inge
522483
| Parameter | Type | Required | Description |
523484
| --------- | ---- | -------- | ----------- |
524485
| `clusterUri` | string | Yes | Cluster URI \(e.g., https://mycluster.eastus.kusto.windows.net) |
525-
| `tenantId` | string | Yes | Microsoft Entra tenant ID hosting the service principal |
526-
| `clientId` | string | Yes | Microsoft Entra application \(client\) ID |
527-
| `clientSecret` | string | Yes | Microsoft Entra application client secret |
528486
| `resource` | string | No | Token audience override. Defaults to the cluster URI itself |
529487
| `database` | string | No | Database context for the command |
530488
| `operationId` | string | No | Operation ID to check, e.g. the ID returned by an async ingestion |

0 commit comments

Comments
 (0)