Microsoft Sentinel
Cloud and workloads

Custom Graphs Overview

In brief

The guidance now states that interactive-session graphs are temporary, on-demand graph jobs materialize graphs for 30 days before deletion, and custom graph activity is billed under the Microsoft Sentinel graph meter. It also updates terminology, examples, and links.

What Defender admins need to know

Administrators should account for the documented 30-day retention period and graph-related charges when planning investigations and scheduled jobs. No action is required.

Summaries are generated from the documentation change itself.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

#customer intent: As a security researcher, I want to create custom graphs in my tenant so that I can continuously monitor and detect systemic threats.

Common scenarios

These scenarios representshow a sample of what’s possible with custom graphs. You can model any entities, relationships, and data from the Sentinel data lake, enablinglake. Build graphs tailored to your specific security workflows and investigative needs.

Scenario Key questions that graph can help answer

Use the Jupyter notebooks in Microsoft Visual Studio Code to interactively create and analyze custom graphs with your data in the Microsoft Sentinel data lake. The notebooks are provided by the Microsoft Sentinel Visual Studio Code extension that allows you to interact with the Microsoft Sentinel data lake using Python for Spark (PySpark). For more information on the Microsoft Sentinel Visual Studio Code extension, see Install Visual Studio Code and the Microsoft Sentinel extension.

You can author custom graphs using either AI‑assisted graph authoring or by writing your own code usingcode. Use the Microsoft Sentinel graph provider reference to define the nodes and edges in your graph model (nodes and edges),model, transform your data from the Sentinel data lake, and usequery your graphs with Graph Query Language (GQL) to query and analyze your graphs.. For more information, see AI-assisted custom graph authoring in Microsoft Sentinel, Microsoft Sentinel graph provider reference and Graph Query Language (GQL) reference for Sentinel custom graph.

OnceAfter you author the graph code in a notebook, your can run the notebook in an interactive session or schedulepublish a graph job. Graphs created during thean interactive notebook session are ephemeraltemporary and are available only in the context of the notebookthat session. To materialize your graph and share with your team, schedule aAn on-demand graph job to rebuild your graph frequently. Once materialized,materializes the graph is accessible from:for 30 days and then deletes it. A scheduled graph job rebuilds the graph on the refresh schedule you configure. You can access a materialized graph from the graph experience under Microsoft Sentinel in Microsoftthe Defender portal under Sentinel,portal, Visual Studio Code Notebooks,notebooks, and Graphgraph query APIs.

Creating and querying custom graphs is billed under the Microsoft Sentinel graph meter. For more information, see Graph charges.

The following table summarizes the steps to build custom graphs in Microsoft Sentinel:

Step Description
1. Create and investigate a graph in an interactive notebook session - Jupyter notebooks in Microsoft Sentinel provide an interactive environment for exploring and analyzing data in the Microsoft Sentinel Lake.data lake.
- The Microsoft Sentinel extension includes a graph builderthe sentinel_graph Python library.
- Use thea Jupyter notebook in Sentinel to define nodes and edges with Lake data,data from the Microsoft Sentinel data lake and create graphs.
- The graph builderUse the sentinel_graph library allows you to query a graph usingwith Graph Query Language (GQL) in the Jupyter graph notebook..
2. Schedule a graph job to materialize your graph - Materialize your graph in your tenant for continued access and collaboration.
- Use Sentinel jobs to tailor how often you want to refresh a materialized graph with Lake data.
- Query and visualize materialized graphs in graph experience in Microsoft Sentinel.
3. Run advanced graph algorithms - Use Jupyter notebooks for accessing built-in support for GraphFrames analytics and graph traversal functions.
- Use purpose-built Sentinel graph algorithms for common security use cases.

Visualizing graphs in Microsoft Sentinel

Microsoft Sentinel provides multiple options for visualizing graphs, including the graphs experience Microsoft Sentinel, Jupyter notebooks in the Sentinel Visual Studio Code extension. The graph experience lets you run Graph Query Language (GQL) queries, view the graph schema,schema (the defined node and edge types), visualize the graph, view graph results in tabular format, and interactively traverse the graph to the next hop with a simple click.

:::image type="content" source="./media/custom-graphs-overview/graph-exploration-phishing-query.png" alt-text="Screenshot of the Sentinel graph in Microsoft Sentinel showing a graph visualization." lightbox="./media/custom-graphs-overview/graph-exploration-phishing-query.png":::