Home / Market / azure kusto irql graph

azure kusto irql graph

Apply IRQL graph functions to KQL or IRQL query results for Kusto Explorer visualization. Generates Lift_To_Graph mappings and composes Graph_Render_View, Graph_Fold_By_Property, Extract_Node_*, Enrich_Node_*, and Enrich_Graph_* calls. Accepts a supplied query or limited basic natural-language source request; it is not a general natural-language-to-KQL/IRQL skill. WHEN: Lift_To_Graph, Graph_Render_View, Graph_Fold_By_Property, IRQL graph enrichment, graph mapping for existing query results, icon

skill★ 33100 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

--- name: azure-kusto-irql-graph description: "Apply IRQL graph functions to KQL or IRQL query results for Kusto Explorer visualization. Generates Lift_To_Graph mappings and composes Graph_Render_View, Graph_Fold_By_Property, Extract_Node_*, Enrich_Node_*, and Enrich_Graph_* calls. Accepts a supplied query or limited basic natural-language source request; it is not a general natural-language-to-KQL/IRQL skill. WHEN: Lift_To_Graph, Graph_Render_View, Graph_Fold_By_Property, IRQL graph enrichment, graph mapping for existing query results, icon-decorated graph, fold graph nodes. Use azure-kusto-graph for native make-graph analysis, graph-match, shortest paths, components, or persistent graphs." license: MIT metadata: author: Microsoft version: "1.2.1"

---

IRQL Graph Functions -- Query Results to Visualization

Apply the IRQL graph function family to tabular results. Given a KQL or IRQL query and the user's graph description, generate a Lift_To_Graph mapping and compose only the stored graph functions needed to visualize, fold, extract, or enrich the graph in Kusto Explorer. The source query does not need to use IRQL.

Scope and Routing

| Request | Use | |---|---| | Turn supplied KQL/IRQL rows into an icon-decorated visual graph | This skill: Lift_To_Graph + Graph_Render_View | | Fold nodes or apply Extract_Node_*, Enrich_Node_*, or Enrich_Graph_* | This skill | | Use make-graph, graph-match, shortest paths, connected components, graph models, or snapshots | azure-kusto-graph | | Author a non-trivial KQL/IRQL investigation from natural language | A Kusto or IRQL query-generation skill, then this skill |

If a request mixes visualization and native graph analysis, use this skill for the lift/render portion and azure-kusto-graph for operator semantics. Do not replace graph-lift functions with a hand-built edges-first graph unless the user asks for native graph operators.

Input Contract

Activation Triggers

Use this skill when the user:

Do not activate this skill solely for graph-match, graph paths/components, persistent graphs, or generic make-graph construction; those belong to azure-kusto-graph.

Not a natural-language-to-KQL/IRQL converter. The input should generally be a working KQL or IRQL query whose results need graph visualization. Basic NL source requests work only for trivial single-table/selector cases. For general NL-to-KQL or NL-to-IRQL, use a dedicated query-generation skill (available separately).

Environment

Function Preflight

Lift_To_Graph and Graph_Render_View are stored functions, not built-in Kusto operators. Before generating or running a lift pipeline against a target database, check what is deployed:

.show functions
| where Name in~ ("Lift_To_Graph", "Graph_Render_View", "Graph_Fold_By_Property")
| project Name

IRQL Graph Function Family

Lift_To_Graph(T, mappingJson)

Transforms any tabular KQL result into a unified node + edge table.

Input: Any table T + a JSON mapping string.

Output: Rows with EntityType = "node" or "edge", ready for make-graph.

Graph_Render_View(T)

Takes Lift_To_Graph output, splits nodes/edges, and calls make-graph to open Kusto Explorer's graph window.

Graph_Fold_By_Property(T, NodeType, PropertyName)

Collapses nodes of a given type sharing a property value into a single node. Rewires edges automatically.

Graph Extraction and Enrichment Functions

These are additional stored functions that must already be deployed on the target database. They are not bundled in references/DEPLOY_IRQL_FUNCTIONS.md. Use .show functions to verify availability before including in a pipeline.

| Function | Operation | Key Property | |---|---|---| | Extract_Node_Email_Sender_Domain(T, displayName) | Adds Domain to node props | EmailSender | | Extract_Node_Employee_Firstname(T, displayName) | Adds Firstname to node props | Name | | Extract_Node_Event_Network_Domain(T, displayName) | Adds DomainName to node props | Url | | Enrich_Node_Ip_Employee(T, displayName) | Adds employee info to IP nodes | ClientIp | | Enrich_Node_Username_Employee(T, displayName) | Adds employee info to user nodes | Username | | Enrich_Node_Event_Authentication_Username(T, displayName) | Adds auth context | Username | | Enrich_Node_Ip_Domain(T, displayName) | Adds DNS domains | ClientIp | | Enrich_Node_Ip_Event_NetworkOutbound(T, displayName) | Adds outbound events | ClientIp | | Enrich_Graph_Ip_Employee(T, mappingJson) | Expands graph with employee nodes | ClientIp | | Enrich_Graph_Username_Employee(T, mappingJson) | Expands graph with employee nodes | Username | | Enrich_Graph_Event_Authentication_Username(T, mappingJson) | Expands with auth nodes | Username |

Mapping JSON Schema

The JSON mapping has two arrays: node_types and edges.

node_types[]

| Field | Required | Description | |---|---|---| | type | Yes | Node type label (e.g. "User", "Host", "IP") | | id | Yes | Prefix for node ID; usually same as type | | key | Yes | Column name whose value becomes the node's identity | | props | Yes | Array of columns to carry as node properties | | defaults | No | Object of fallback values for null/empty properties | | defIcon | No | Default icon URL for this node type | | displayName | No | Column to use for display label (defaults to id) | | color | No | Column to source color from | | size | No | Column to source size from |

edges[]

| Field | Required | Description | |---|---|---| | type | Yes | Edge type label (e.g. "AuthenticatesTo", "SentEmail") | | source | Yes | {"id": "<prefix>", "type": "<NodeType>"} | | target | Yes | {"id": "<prefix>", "type": "<NodeType>"} | | props | No | Array of columns to carry as edge properties | | displayName | No | Column for edge label | | color | No | Column for edge color |

Icon Repository

Use icons from https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/:

Mapping Generation Rules

Given the supplied query columns and the user's graph description, generate the mapping JSON by:

  1. Identify entities -> each distinct noun becomes a node_type
  2. Identify relationships -> each verb/preposition becomes an edge
  3. Map to columns -> use actual columns produced by the supplied query; never assume unavailable columns
  4. Set direction -> source is the actor, target is the acted-upon
  5. Add properties -> include columns relevant to investigation (timestamps, results, hashes)
  6. Assign icons -> pick from the icon set above based on entity type

Column Reference (IRQL unified schema)

| Entity | Key Column | Available Props | |---|---|---| | User | Username | Username, Name, Role, Email | | Host | Hostname | Hostname | | IP | ClientIp | ClientIp | | Email Message | Subject | EnvTime, Subject, Verdict, Url | | Sender | EmailSender | EmailSender, Domain | | Recipient | EmailRecipient | EmailRecipient | | Process | ProcessName | EnvTime, ProcessName, ProcessCommandLine, ProcessHash | | File | Filename | EnvTime, Filename, Path, Sha256 | | Domain | DomainName | DomainName | | Auth Event | (synthetic ID) | EnvTime, UserAgent, Result, Description |

Function Selection

  1. Start with the supplied KQL/IRQL tabular pipeline.
  2. Use Lift_To_Graph(mapping) to create graph entities.
  3. Add Extract_Node_*, Enrich_Node_*, or Enrich_Graph_* only when requested and compatible with the mapped keys.
  4. Add Graph_Fold_By_Property() only when grouping/collapse is requested.
  5. End visual output with Graph_Render_View().
  6. Preflight the exact stored functions selected for the pipeline.

Pipeline Pattern

// 1. Preserve the supplied KQL or IRQL query
<input query>
// 2. Lift to graph
| invoke Lift_To_Graph(<mapping_json>)
// 3. Optionally extract or enrich graph entities
| invoke <Extract_Node_* | Enrich_Node_* | Enrich_Graph_*>()
// 4. Optionally fold nodes when requested
| invoke Graph_Fold_By_Property("<NodeType>", "<PropertyName>")
// 5. Render
| invoke Graph_Render_View()

Examples

For additional prompts and worked examples, see references/EXAMPLES.md.

Authentication graph: IP -> AuthEvent -> User -> Host

Input query: Get_Event_Authentication_All | where Result == "Failed Login" | take 200

Graph request: "Show IPs, authentication events, users, and hosts; fold events by result."

let auth_mapping = '{"node_types":[{"type":"SrcIp","id":"SrcIp","key":"ClientIp","props":["ClientIp"],"defaults":{},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/Public-IP-Addresses-(Classic).svg"},{"type":"Host","id":"Host","key":"Hostname","props":["Hostname"],"defaults":{},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/Virtual-Machine.svg"},{"type":"User","id":"User","key":"Username","props":["Username"],"defaults":{},"defIcon":"https://raw.githubuserconten