Agent Foskett Academy • Microsoft Sentinel • Module 5 • Lesson 48

Lesson 48 — Adding Interactive Parameters and Filters to Workbooks

Your first workbook is working. Now make it useful when the SOC asks a more specific question.

Build time, account and application filters that lead analysts to the right evidence.

Module 5 — Workbooks and Dashboards • Interactive investigation views
Agent Foskett Microsoft Sentinel interactive workbook parameters and filters
What you will learn

Make a workbook respond to analyst questions.

✓ Time-range controls
✓ Account and app selectors
✓ Dependent filters
✓ Validation and drill-downs

The next step after Lesson 47

Last lesson, we built an Identity Sign-In Operations workbook. It worked, but analysts still had to look at broadly scoped results. Now we will make the same workbook interactive: one time selector, one account selector and one application selector will help investigators narrow their questions without rewriting every query.

Learning objectives

  • Explain the difference between workbook parameters, query filters and visual selection.
  • Create and validate a time-range parameter.
  • Build account and application selectors from available data.
  • Connect filters to the appropriate query components.
  • Handle empty, all and single-selection states deliberately.
  • Design a safe, readable investigation drill-down.
  • Troubleshoot parameters that appear to work but do not actually filter data.

The operational question

ANALYST QUESTION: Which account experienced repeated sign-in failures, during which period, and against which application? [Time range] → [Account] → [Application] ↓ ↓ ↓ Trend Ranking Evidence

Why parameters matter

Parameters let an analyst change the context of a workbook without editing the underlying KQL every time. A useful parameter should have a clear label, a sensible default and a predictable effect on the components that consume it.

A parameter that is visible but not wired to a query is just decoration.

Parameters are not all the same

TypeExampleTypical purpose
Time rangeLast 24 hoursConstrain the investigation period
DropdownUserPrincipalNameFocus on one identity
DropdownAppDisplayNameFocus on an application
Text inputSearch termNarrow a suitable detail view
Resource selectorWorkspaceChoose an authorised data source

Start with a safe lab

  • Open the workbook from Lesson 47 in edit mode.
  • Confirm that SigninLogs is populated in the selected workspace.
  • Save a working copy before changing existing components.
  • Use an authorised workspace and avoid exposing real usernames in screenshots.
  • Remember that labels and exact authoring controls vary by Azure workbook experience.

Step 1 — Create the time-range control

  1. Choose Add parameter in workbook edit mode.
  2. Create a Time range parameter named TimeRange.
  3. Choose a clear display label, such as Investigation period.
  4. Set a default such as Last 24 hours.
  5. Save the parameter and place it above the trend and evidence components.

A time-range parameter is usually best applied through the query component’s Time range setting. That avoids hand-building date expressions in KQL.

Step 2 — Wire the time range to queries

For each sign-in query component, set its time-range source to the TimeRange workbook parameter where supported. Remove any conflicting fixed ago(24h) condition, or explicitly adapt the query to the chosen parameter.

Do not assume a dropdown controls the query merely because it appears at the top of the page. Change it and verify the returned event window.

Step 3 — Test the time parameter

  • Select a short window and record the number of events.
  • Select a longer window and compare the results.
  • Check the earliest and latest timestamps in the detail table.
  • Confirm that all intended components change together.
  • If results do not change, inspect the component’s time-range binding and any hard-coded KQL filters.

Step 4 — Discover available accounts

Account options — data-driven selector
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
SigninLogs
| where TimeGenerated > ago(7d)
| where isnotempty(UserPrincipalName)
| summarize LastSeen = max(TimeGenerated)
    by UserPrincipalName
| order by UserPrincipalName asc
| project value = UserPrincipalName,
          label = UserPrincipalName

Use this query as the data source for an account dropdown if your workbook editor supports query-driven parameter values. The column names value and label are common workbook parameter conventions; verify the mapping in your editor.

The seven-day option-discovery window is illustrative. Restrict values and access appropriately for your environment.

Step 5 — Create the account dropdown

  1. Add a new parameter named Account.
  2. Select an appropriate dropdown-style control.
  3. Choose query-based values and point it to the account options query.
  4. Configure the value and display-label fields if the editor requests them.
  5. Choose whether the parameter requires a selection or supports an All accounts state.
  6. Place the control beside the time selector and save.

For a first lab, single selection is easier to validate than multiselect.

Step 6 — Account filtering logic

An account selector needs an explicit rule for all, one account and no selection. The query below shows the intended KQL logic with a fixed test value. Replace the test value using the workbook editor’s documented parameter binding and escaping mechanism; do not simply paste untrusted text into a KQL string.

Test the account filter with a fixed value
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
let SelectedAccount = "alex@contoso.com";
SigninLogs
| where TimeGenerated > ago(24h)
| where UserPrincipalName =~ SelectedAccount
| project TimeGenerated, UserPrincipalName,
          IPAddress, AppDisplayName, ResultType
| order by TimeGenerated desc
| take 100

This example is deliberately self-contained so it can run in a suitable Logs environment. The final interactive version must bind SelectedAccount to your workbook parameter safely and apply the selected time range consistently.

Step 7 — Decide what “All” means

An All accounts option should mean the account predicate is not applied, not that a literal account named “All” is searched. The exact token and substitution syntax depend on the parameter configuration and editor.

Test both all-account and single-account states with known data. Do not let an empty parameter silently broaden a sensitive query.

Step 8 — Add an application selector

Application options — data-driven selector
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
SigninLogs
| where TimeGenerated > ago(7d)
| where isnotempty(AppDisplayName)
| summarize LastSeen = max(TimeGenerated)
    by AppDisplayName
| order by AppDisplayName asc
| project value = AppDisplayName,
          label = AppDisplayName

Create a second dropdown parameter named Application. This allows analysts to focus on a particular app, such as a cloud service with a spike in failures.

Step 9 — Combine filters deliberately

For a selected account and application, both conditions should be applied to the same event rows. The following query is a testable, fixed-value example of the intended result.

Account and application filter — fixed-value test
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
let SelectedAccount = "alex@contoso.com";
let SelectedApp = "Office 365 Exchange Online";
SigninLogs
| where TimeGenerated > ago(24h)
| where UserPrincipalName =~ SelectedAccount
| where AppDisplayName =~ SelectedApp
| project TimeGenerated, UserPrincipalName,
          AppDisplayName, IPAddress, ResultType
| order by TimeGenerated desc
| take 100

Actual AppDisplayName values depend on your tenant. Substitute a value that exists in your data, then replace the fixed values with appropriately escaped workbook bindings. Ensure the workbook’s time-range parameter also controls the final query.

Step 10 — Understand dependent filters

A dependent application dropdown can show only apps observed for the selected account. This is useful, but introduces another dependency: when the account changes, the current application selection may no longer be valid.

If you build a dependent dropdown, configure refresh behaviour and test how the editor handles an invalid previous selection.

Step 11 — Avoid circular dependencies

GOOD: TimeRange → Account options Account → Application options Both → Evidence query AVOID: Account depends on Application Application depends on Account (with no clear initial/default state)

Step 12 — Design the filtered detail table

Detail columns for an analyst pivot
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
SigninLogs
| where TimeGenerated > ago(24h)
| project TimeGenerated, UserPrincipalName,
          AppDisplayName, IPAddress, ResultType,
          ConditionalAccessStatus
| order by TimeGenerated desc
| take 200

Use this as the baseline evidence table, then apply the selected parameters in the workbook query component. Preserve the event-level columns analysts need to investigate; do not reduce everything to a single total.

Step 13 — Make drill-downs useful

A sensible workflow is trend → account → application → underlying events. If the workbook supports parameter-setting links or interactive row selections, connect them to the detail view and test their behaviour. Exact link actions vary by workbook visualisation and editor.

Keep an obvious path back to the unfiltered view.

Step 14 — Label the scope visibly

ControlGood labelAvoid
TimeRangeInvestigation periodRange
AccountAccount to investigateValue 1
ApplicationApplicationChoice
All stateAll accountsBlank without explanation

Step 15 — Validate filter combinations

TestExpected result
Last 24 hours + all accountsEvents within selected period
Last 24 hours + one accountOnly that account’s events
One account + one applicationRows satisfy both conditions
No matching account/app pairClearly empty results
Change time rangeAll intended components refresh
Clear filterReturns to documented default or All state

Step 16 — Check security and access

Parameters do not bypass workspace permissions, and they are not a security boundary. Users must have appropriate access to the workbook and the underlying logs. Avoid using a dropdown as a substitute for row-level access control or least-privilege design.

Use the workbook editor’s supported parameter escaping and type handling rather than constructing raw query fragments from free-text input.

Step 17 — Keep performance under control

  • Constrain query time ranges early.
  • Limit dropdown option lists when data sets are large.
  • Avoid a separate expensive query for every tiny visual.
  • Use summaries for trends and bounded rows for evidence tables.
  • Test both narrow and broad filter selections.

Step 18 — Troubleshoot a broken filter

SymptomLikely cause / next check
Dropdown changes but chart does notComponent is not bound to parameter
No account optionsWrong workspace, no data, permissions, option query
All returns zero rowsAll token treated as literal value
Changing account leaves empty appDependent selector did not refresh
Results ignore time rangeHard-coded KQL time filter
Query fails after selectionParameter quoting, escaping or type mismatch

Agent Foskett investigation exercise

A SOC analyst notices repeated failures for one account and wants to know whether the activity was concentrated on a particular application.

  1. Set the workbook to a 24-hour investigation period.
  2. Choose an account with repeated failures in your authorised data.
  3. Inspect the ranked table and detailed events.
  4. Filter to one application and compare the count.
  5. Clear the application filter and verify the wider results return.
  6. Change the time range and confirm every intended component responds.
  7. Write one observed fact and one question that still needs investigation.

Final workbook review

  • Every parameter has a clear name and default.
  • Every intended query is actually bound to the correct parameter.
  • All, empty and single-value states behave as designed.
  • Underlying events remain available for investigation.
  • Access and data-quality limitations are documented.
  • The workbook has been saved, reopened and tested.

Agent Foskett takeaway

Interactive workbooks are useful only when their filters genuinely change the evidence being shown.

A good analyst asks, “What did I select, what did the query return, and what does that result actually prove?”

The logs already knew. The filters just helped Foskett find the right ones.

Lesson 48 complete
Your operational workbook now has a clear plan for time, account and application filters, with validation checks to ensure every selection changes the intended evidence.
Sentinel Academy Home