Lesson 47 — Building Your First Operational Workbook
Last lesson, we designed the workbook.
Now Agent Foskett gets his hands dirty and builds an Identity Sign-In Operations workbook from scratch.

What you will build
Identity Sign-In Operations
What you will build
In Lesson 46, we designed an operational workbook. Now we will build one: Identity Sign-In Operations, a reusable view of sign-in activity that helps analysts find unusual patterns and pivot into the underlying records.
The lab uses Microsoft Entra sign-in logs in a Log Analytics workspace. You will create a summary, a trend, a ranked account table and a detail view.
Learning objectives
- Open an editable Azure Monitor / Microsoft Sentinel workbook.
- Check the correct workspace and data source before writing queries.
- Create an hourly sign-in trend using KQL.
- Add a ranked table of accounts with repeated failures.
- Add a time-range parameter and apply it consistently.
- Test the workbook for empty results, performance and permissions.
- Save and share the workbook with appropriate access.
Prerequisites and safety
- A Microsoft Sentinel-enabled Log Analytics workspace or an appropriate Azure Monitor workspace.
- The
SigninLogstable populated by a suitable Entra sign-in log diagnostic configuration or connector. - Permission to read the workspace data and create/edit the workbook in the intended resource scope.
- A training or authorised environment. Never use sensitive production identity data in screenshots or demonstrations.
Portal paths and labels can vary as Microsoft Sentinel capabilities transition toward the Defender portal. This walkthrough uses the Azure workbook authoring experience; use the equivalent supported editor in your environment.
Our finished workbook layout
Step 1 — Open the workbook editor
- In the Azure portal, open the appropriate Microsoft Sentinel workspace or Azure Monitor workbook area.
- Go to Workbooks and choose the option to add or create a workbook.
- Open an editable blank workbook, or start from an appropriate blank template.
- Confirm you are editing the workbook in the intended subscription, resource group and workspace context.
If your organisation uses the Defender portal for Sentinel operations, follow its current workbook navigation or open the Azure workbook authoring surface provided for your environment.
Step 2 — Give the workbook a purpose
Add a text section with a clear title and one-sentence explanation:
This small description prevents future readers from mistaking the workbook for an organisation-wide security verdict.
Step 3 — Check the data source
Before adding charts, confirm that SigninLogs exists and contains recent records. Select the correct Logs / Log Analytics data source and workspace in the workbook query editor.
- 1
- 2
- 3
- 4
- 5
SigninLogs
| where TimeGenerated > ago(24h)
| summarize Events = count(),
LatestEvent = max(TimeGenerated)A zero count, empty latest timestamp or query error requires investigation. Check connector configuration, workspace selection, permissions, ingestion latency and the actual period covered by your data.
Step 4 — Add the first query component
- In workbook edit mode, choose Add query (or the equivalent query component).
- Choose a Log Analytics / Logs source and the workspace containing
SigninLogs. - Paste the hourly trend query below.
- Run it and inspect the returned columns before changing the visualisation.
Step 5 — Build the hourly trend
- 1
- 2
- 3
- 4
- 5
- 6
SigninLogs
| where TimeGenerated > ago(24h)
| where ResultType != "0"
| summarize FailedSignIns = count()
by bin(TimeGenerated, 1h)
| order by TimeGenerated ascConfigure a time chart or equivalent time-series display, with TimeGenerated as the horizontal axis and FailedSignIns as the numeric value. Label the component Failed sign-ins by hour.
This counts failed sign-in records as defined by the selected ResultType filter. It does not count unique attackers or compromised accounts.
Step 6 — Read the trend like an analyst
Look for an abrupt increase, repeated activity over several hours or a change from the normal pattern. But ask whether a scheduled job, misconfigured application or authentication outage could explain it.
A spike is a reason to investigate, not proof of malicious activity.
Step 7 — Add the ranked accounts table
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
SigninLogs
| where TimeGenerated > ago(24h)
| where ResultType != "0"
| summarize Failures = count(),
UniqueIPs = dcount(IPAddress),
LastSeen = max(TimeGenerated)
by UserPrincipalName
| where Failures >= 5
| order by Failures descAdd a second query component. Display it as a table with account, failure count, distinct source IP count and last-seen time. The threshold of five is for this lab only; it is not a recommended detection threshold.
Step 8 — Add an evidence-level table
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
SigninLogs
| where TimeGenerated > ago(24h)
| where ResultType != "0"
| project TimeGenerated, UserPrincipalName,
IPAddress, AppDisplayName, ResultType,
ConditionalAccessStatus
| order by TimeGenerated desc
| take 100Add a third query component, displayed as a table. It gives analysts actual events to inspect rather than just summary counts. The take 100 cap limits visible rows; it does not imply there were only 100 failures.
Step 9 — Add a time-range parameter
- In edit mode, choose Add parameter or the equivalent parameter control.
- Create a time-range parameter, for example
TimeRange. - Give it a practical default such as Last 24 hours.
- Configure each query component to use the parameter as its workbook time-range setting.
- Remove or adapt the hard-coded
ago(24h)filters in your KQL so the selected range actually controls the results.
Depending on the workbook editor and query source, the time-range control may be applied through the component’s query settings or by referencing the parameter in KQL. Do not apply a parameter and leave contradictory hard-coded time filters.
Step 10 — Verify the time filter works
Switch between a short and long period and check that the counts and plotted intervals change as expected. For queries with explicit KQL time filters, validate that they use the selected workbook parameter.
For a real deployment, document the chosen time-range binding and test it with your portal version; do not assume a visible dropdown is wired to every query.
Step 11 — Keep the workbook readable
| Component | Display | Analyst question |
|---|---|---|
| Title and scope | Text | What does this workbook cover? |
| Hourly failures | Time-series chart | When did activity change? |
| Repeated failures | Ranked table | Which accounts deserve review? |
| Recent events | Detail table | What actually happened? |
| Data notes | Text | What might be missing? |
Step 12 — Consider an account filter
An account parameter can help analysts narrow a detailed query to a single user. Add it only after the core workbook works, and make sure the query handles a blank or all-accounts selection correctly.
For training, it is perfectly acceptable to start with a time parameter and defer more advanced filters to a later lesson.
Step 13 — Test the empty state
Select a time range with no events, if practical. Does the workbook clearly show an empty result rather than suggesting everything is secure?
Check whether the underlying table is absent, the connector stopped sending data, the selected workspace is wrong, or the query genuinely has no matching rows.
Step 14 — Check data freshness
- 1
- 2
- 3
- 4
- 5
SigninLogs
| summarize LatestEvent = max(TimeGenerated),
TotalRecords = count()
| extend MinutesSinceLatest =
datetime_diff("minute", now(), LatestEvent)A stale latest timestamp can make a dashboard misleading. Interpret freshness against expected connector latency and collection configuration. A missing latest timestamp is a data-availability issue, not a clean bill of health.
Step 15 — Test performance
- Use bounded time ranges and sensible result limits.
- Summarise high-volume data before plotting it.
- Avoid duplicating expensive queries across components.
- Test a longer time range to find slow components.
- Avoid putting large unfiltered event tables at the top of the page.
Step 16 — Save the workbook
- Use the workbook editor’s Save or Save as action.
- Choose the correct subscription, resource group, name and location as prompted.
- Use a descriptive name such as Identity Sign-In Operations.
- Save and reopen the workbook to confirm that the layout, queries and parameters persist.
Saving creates or updates a workbook resource. It does not automatically grant every SOC analyst permission to view its data.
Step 17 — Validate access
Check access using an appropriately authorised analyst identity. Workbook access and underlying workspace query permissions are separate considerations. An analyst may be able to open the workbook but lack permission to run one or more queries.
Follow organisational RBAC and resource-sharing standards. Avoid making sensitive workbooks broadly accessible simply to fix a permission error.
Step 18 — Document assumptions
- Source:
SigninLogsin the selected workspace. - Failures: events matching the chosen
ResultTypecondition. - Account ranking: at least five matching records in the selected period.
- Time: workbook time-range selection once wired and tested.
- Limitations: ingestion delays, missing sources, service accounts and legitimate failures.
Common build problems
| Symptom | First checks |
|---|---|
| Query returns no rows | Table, connector, workspace, period, permissions |
| Chart does not render | Timestamp column, numeric value, visual type |
| Time filter has no effect | Parameter binding and hard-coded filters |
| Workbook is slow | Time window, result size, repeated queries |
| Colleague sees an error | Workbook RBAC and data-source permissions |
| Counts look inconsistent | Filter logic, data latency, query time range |
Hands-on challenge
- Build the workbook using the three provided queries.
- Give every chart or table a meaningful title.
- Add and test a time-range parameter.
- Record the newest available sign-in event.
- Explain why the top-ranked account is not necessarily compromised.
- Save, reopen and test access with an authorised analyst.
- Write two limitations readers should see before relying on the results.
Agent Foskett takeaway
Start with a question. Build the query. Check the evidence. Then choose the visual.
A dashboard should help the analyst find the next lead — not pretend to have finished the investigation.
The logs already knew.
