Workbooks and Dashboards

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 12 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Module: Create Detections and Investigations Using Sentinel

Lesson: Workbooks and Dashboards for Data Visualization

Introduction: Why Visualization Matters in Security Operations

In the modern security landscape, the sheer volume of telemetry data generated by cloud environments, endpoints, and identity providers is staggering. A security analyst cannot possibly parse through raw logs in a Kusto Query Language (KQL) console for every investigation. This is where data visualization tools, specifically Microsoft Sentinel Workbooks, become indispensable. They transform raw, chaotic log data into actionable intelligence, allowing security teams to identify trends, spot anomalies, and communicate findings to stakeholders effectively.

Visualization is not just about making data look pretty; it is about cognitive efficiency. When an analyst is under pressure during an active incident, their ability to quickly digest a timeline of events or a geographic map of login attempts can make the difference between containment and a full-scale breach. Workbooks provide a flexible canvas to combine text, charts, graphs, and interactive parameters, creating a narrative out of disparate data points. By mastering these tools, you move from being a reactive log-reader to a proactive threat hunter who understands the "shape" of the network and its associated risks.


Not read yet

Understanding the Architecture of Sentinel Workbooks

Sentinel Workbooks are built on top of Azure Monitor Workbooks. They function as a flexible document format that combines KQL queries with a wide variety of visual components. Unlike a static report, a workbook is a dynamic, interactive application that allows you to drill down into specific data points, filter by time ranges, or pass parameters from one graph to another.

At the core of every workbook is the query provider. When you open a workbook, it sends requests to your Log Analytics workspaces, retrieves the data, and renders it according to the visual configuration you have chosen. Because they are stored as Azure resources, they can be shared across teams, version-controlled, and even deployed as code via ARM templates or Bicep files, ensuring consistency across your security operations center (SOC).

Callout: Workbooks vs. Dashboards While the terms are often used interchangeably, there is a distinct difference in the Sentinel ecosystem. A Dashboard is typically a static, high-level view designed for quick status checks, such as an "Executive Overview" of incident volume. A Workbook is a deep-dive, interactive tool that allows for investigation, data manipulation, and complex multi-step workflows. Think of a dashboard as a clock, and a workbook as a complex diagnostic tool.


Not read yet

Core Components of a Successful Workbook

To build effective visualizations, you must understand the building blocks available in the workbook editor. Every workbook is composed of "items," which are stacked vertically. These items include:

  • Text Blocks: These use Markdown to provide context, instructions, or links to incident response playbooks. They are essential for turning a technical dashboard into a functional manual for junior analysts.
  • Queries: These are the heart of the workbook. You use KQL to fetch data, and the workbook renders the result in a table, bar chart, line graph, or pie chart.
  • Parameters: These allow for user input. You can create dropdown menus to select a specific time range, a specific user, or a specific device. These selections then update every other query in the workbook simultaneously.
  • Links/Tabs: These allow you to organize large amounts of data into logical sections, preventing the "wall of data" problem where a single page becomes overwhelming.

Not read yet

Step-by-Step: Creating Your First Investigation Workbook

Let’s walk through the process of creating a simple yet powerful "Account Investigation" workbook. This tool will help an analyst quickly see the activity associated with a specific user account.

Step 1: Initialize the Workbook

Navigate to the Microsoft Sentinel portal and select the "Workbooks" blade. Click on "New" to start with a blank template. You will see a workspace that allows you to add items.

Step 2: Add a Parameter for User Identification

The most critical part of an investigation workbook is the ability to search for a specific entity.

  1. Click "Add" then "Add parameter."
  2. Set the parameter name to UserAccount.
  3. Set the parameter type to "Text" or "Query."
  4. If choosing "Query," use the following KQL to populate a dropdown with users who have logged in recently:
    SigninLogs
    | where TimeGenerated > ago(7d)
    | summarize by UserPrincipalName
    | sort by UserPrincipalName asc
    
  5. Save the parameter. Now, every other query in your workbook can reference {UserAccount}.

Step 3: Add a Query for Sign-in Activity

Now that you have a parameter, create a query to show sign-in trends for that user:

  1. Click "Add" then "Add query."
  2. Use the following KQL:
    SigninLogs
    | where UserPrincipalName == "{UserAccount}"
    | where TimeGenerated {TimeRange}
    | summarize Count = count() by bin(TimeGenerated, 1h), ResultType
    | render timechart
    
  3. Notice the use of {UserAccount} and {TimeRange}. The workbook will automatically replace these with the values selected in the top parameters.

Step 4: Add Contextual Text

It is a best practice to add instructions for the analyst. Click "Add" then "Add text." Explain what this workbook is for: "This report shows anomalous login patterns for the selected user. If the 'Count' spikes, investigate the 'ResultType' to see if there are failed login attempts."

Tip: Use Parameters for Dynamic Filtering Always include a TimeRange parameter in your workbooks. It allows analysts to toggle between the last 24 hours, 7 days, or a custom range without needing to edit the underlying KQL queries.


Not read yet

Advanced Visualization Techniques

Once you are comfortable with basic tables and charts, you can move into more advanced visualizations that provide deeper context.

Using Maps for Geo-Location

If you are tracking sign-ins, seeing the physical location of the requester is vital. You can use the render map command in KQL to visualize where threats are originating.

SigninLogs
| where TimeGenerated > ago(24h)
| summarize EventCount = count() by IPAddress, Location
| join kind=inner (
    IPInfo 
    | project IPAddress, Latitude, Longitude
) on IPAddress
| render map

Heatmaps for Time-Based Analysis

Heatmaps are excellent for identifying "impossible travel" or logins at odd hours. By plotting the hour of the day against the day of the week, you can spot patterns that a standard line chart might miss.

SigninLogs
| where TimeGenerated > ago(30d)
| extend Hour = datetime_part("hour", TimeGenerated)
| extend Day = dayofweek(TimeGenerated)
| summarize Count = count() by Hour, Day
| render heatmap

Not read yet

Best Practices for Designing Effective Dashboards

When designing workbooks for a SOC team, keep in mind that "less is more." A dashboard cluttered with 50 different charts is useless because the analyst will not know where to look first. Follow these industry standards:

  1. Hierarchy of Information: Place the most critical information (e.g., current active incidents, high-priority alerts) at the very top. Place supporting data (e.g., raw logs, system health) at the bottom.
  2. Color Consistency: Use consistent colors for status indicators. For example, always use red for "High Severity" and green for "Success." If you use red for "High Severity" in one chart and blue in another, you will create confusion.
  3. Actionable Data: Every chart should lead to a question or an action. If a chart shows "Total Bytes Transferred," ask yourself: "What will an analyst do with this number?" If the answer is "nothing," remove it.
  4. Performance Optimization: Large KQL queries can slow down a workbook. Always use where clauses to limit the time range and the scope of data being scanned. Use project to keep only the columns you need.
  5. Documentation: Use the Markdown capabilities of the workbook to explain how to use the data. Include links to internal documentation or standard operating procedures (SOPs).

Warning: Avoid "Query Overload" A common mistake is adding too many heavy queries to a single workbook. Each time a user opens the workbook, every query executes simultaneously. This can lead to slow load times and potential throttling of your Log Analytics workspace. If a workbook takes longer than 10 seconds to load, it is likely too complex; consider splitting it into two separate workbooks.


Not read yet

Comparison: When to Use Which Visualization

Different types of security data require different visualization methods. Use the following guide to determine the best approach:

Data Type Recommended Visualization Why?
Log Volume/Trends Line Chart Best for showing changes over time.
Distribution (e.g., OS types) Pie/Donut Chart Best for showing parts of a whole.
Anomalies/Outliers Scatter Plot Helps identify data points that fall outside the norm.
Geographic Threat Origin Map Quickly identifies malicious traffic from unexpected regions.
Status/Checklists Grid/Table Best for detailed lists of items needing review.

Common Pitfalls and How to Avoid Them

1. The "Default Time Range" Trap

Many developers build workbooks that default to "Last 24 Hours." However, some investigations require looking at a 30-day trend to establish a baseline. Always provide a time range parameter so the analyst can adjust the scope based on the context of the incident.

2. Ignoring Data Granularity

If you are visualizing logs with high frequency (like firewall logs), a line chart with a 1-minute grain will be unreadable. Use the bin() function in KQL to aggregate data into 1-hour or 1-day buckets. This makes the data much easier to interpret.

3. Forgetting About Mobile/Tablet Users

While most SOC analysts use desktops, incident responders on the move might access Sentinel from tablets. Keep your layout vertical and avoid overly wide tables that require horizontal scrolling.

4. Hardcoding Values

Avoid hardcoding specific values like "UserPrincipalName == '[email protected]'" in your queries. Instead, use parameters. This makes the workbook reusable for different users, different departments, and different time periods.


Not read yet

Deep Dive: Parameterization for Advanced Workflows

Parameterization is the "secret sauce" of professional Sentinel workbooks. By using parameters, you can create a "drill-down" experience. For example, you could have a parameter that selects a "Department." When the analyst changes this, the entire workbook updates to show only the logs for that department.

To implement this:

  1. Create a "Department" dropdown parameter.
  2. Ensure the query for that parameter pulls from a reference table (like a CMDB or HR export).
  3. In your main investigation queries, add a line like:
    | where Department == "{Department}"
    

This level of modularity allows you to maintain one "Master Workbook" for the entire organization, rather than creating separate versions for every team.


Integrating External Data with Workbooks

Sentinel workbooks are not limited to just Microsoft logs. Through the use of "Custom Data Connectors" or simply by importing data into custom logs in your Log Analytics workspace, you can visualize non-Sentinel data alongside your security logs.

Imagine you have a CSV file containing a list of "Authorized Users" and their expected working hours. You can upload this to a custom table and join it with your SigninLogs:

let AuthorizedUsers = externaldata(User:string, ExpectedHours:string)
[@"https://yourstorageaccount.blob.core.windows.net/data/users.csv"]
with(format="csv");
SigninLogs
| join kind=leftouter (AuthorizedUsers) on UserPrincipalName
| where TimeGenerated > ago(24h)
| extend IsUnauthorized = iif(isempty(ExpectedHours), "Unknown", "Known")
| project TimeGenerated, UserPrincipalName, IsUnauthorized

This capability allows you to build a comprehensive view of your environment that includes HR data, physical security logs, and network traffic, creating a unified investigative dashboard.


Not read yet

Version Control and Deployment

Because workbooks are Azure resources, they are represented as JSON code. You can view this code by clicking the "Advanced Editor" button in the workbook interface.

Why Version Control Matters:

  1. Collaboration: Multiple analysts can contribute to the development of a workbook.
  2. Rollback: If a new query breaks the workbook, you can quickly revert to the previous version.
  3. Consistency: You can push the same workbook to multiple Sentinel workspaces across different cloud environments, ensuring that your SOC team has the same tools regardless of which tenant they are working in.

To manage your workbooks as code:

  1. Export the JSON of your workbook.
  2. Save it in a Git repository.
  3. Use a CI/CD pipeline (like GitHub Actions or Azure DevOps) to deploy the JSON to your Sentinel workspace using an ARM template.

Callout: The "Advanced Editor" Power The Advanced Editor is not just for viewing code; it is the most powerful tool in the workbook designer's kit. If you have a complex workbook and need to change a query across 10 different charts, you can use "Find and Replace" in the JSON code. This is significantly faster and less error-prone than manually updating each item in the UI.


Not read yet

Best Practices for SOC Documentation within Workbooks

A workbook is often the first place an analyst goes when an alert triggers. Therefore, the workbook should function as a "Living SOP." Include these elements:

  • Header Section: Clear title, owner of the workbook, and last updated date.
  • Contextual Help: Use Markdown to explain what the charts represent. If a chart shows "Failed Logins," explain what a normal threshold for failed logins looks like in your environment.
  • "What to do next" section: After showing the data, provide a list of links to playbooks or specific investigation steps. For example: "If you see more than 50 failed logins in 5 minutes, trigger the 'Disable User' playbook."
  • Feedback Mechanism: Add a simple text link to an internal email or feedback form so analysts can suggest improvements to the workbook.

Managing Access and Permissions

Not every user needs access to every workbook. Use Azure Role-Based Access Control (RBAC) to manage who can view or edit your workbooks.

  • Reader Role: Allows the user to view the workbook and interact with parameters. This is appropriate for SOC analysts.
  • Contributor Role: Allows the user to edit the workbook, change queries, and add new items. This is appropriate for threat hunters or security engineers.
  • Workspace Permissions: Remember that a workbook is only as powerful as the data it accesses. Ensure the user has the appropriate "Log Analytics Reader" permissions on the underlying workspace, otherwise, the workbook will appear empty even if the user has access to the workbook itself.

Not read yet

Troubleshooting Common Workbook Issues

Even with the best planning, things can go wrong. Here is how to handle common issues:

  • "No Data" Errors: This usually means the time range is set to a period where no logs exist, or the query is filtering for a specific entity that does not appear in that time frame. Check your parameters first.
  • Slow Loading: As mentioned earlier, this is usually due to complex queries. Use the "Query Performance" tool in Log Analytics to see which part of your KQL is taking the longest to execute.
  • Broken Links: If you are using buttons to navigate between tabs, ensure the internal IDs are correct. If you rename a tab, you may need to update the links that point to it.
  • Parameter Not Passing: If a parameter is not updating your queries, check that the "Parameter Name" exactly matches the syntax used in your KQL (e.g., {UserAccount}). Case sensitivity matters in some configurations.

Not read yet

FAQ: Common Questions about Sentinel Workbooks

Q: Can I export workbook data to a PDF? A: Yes, most workbooks have a print/export function, but it is often better to provide a link to the workbook itself. Static PDFs lose the interactivity that makes workbooks valuable.

Q: Can I use third-party data sources? A: Yes, as long as the data is ingested into your Log Analytics workspace, you can visualize it. This includes data from AWS, GCP, or on-premises servers.

Q: How do I handle very large datasets? A: Use the take or limit operators during development. For production, use summarize to aggregate the data so that you aren't trying to render millions of rows in a single table.

Q: Can I automate the creation of workbooks? A: Absolutely. Using Bicep or ARM templates, you can deploy a standard set of workbooks to every new workspace you create, ensuring your SOC is ready to go from day one.


Key Takeaways

  1. Visualization is about Efficiency: Workbooks are not just for reporting; they are critical diagnostic tools that allow analysts to perform complex investigations quickly and accurately.
  2. Interactivity is Key: Use parameters to create dynamic, drill-down experiences. A static dashboard is a missed opportunity; an interactive workbook is a force multiplier.
  3. Consistency Matters: Follow design standards such as consistent color coding and clear hierarchy. This reduces cognitive load on your analysts during high-pressure incidents.
  4. Manage as Code: Store your workbooks in source control. This allows for team collaboration, version history, and automated deployment across your entire cloud footprint.
  5. Documentation is Part of the Tool: Use Markdown to turn your workbooks into "Living SOPs." By providing context and next steps directly in the interface, you reduce the time it takes to onboard new team members.
  6. Performance is Critical: Keep queries optimized and scope them appropriately. A slow workbook is an unused workbook. Always test with real-world data volume before rolling out to the entire team.
  7. Iterate and Improve: Treat your workbooks as products. Gather feedback from the analysts who use them daily and iterate on the design to make their workflows more efficient.

By applying these principles, you will transform your Sentinel instance from a simple log repository into a powerful, interactive command center that enables your team to detect, investigate, and respond to threats with confidence. Remember that the goal is to make the complex simple—every chart, filter, and text block should serve that singular purpose.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.