IT and Security Tools Library · Endpoint protection

Microsoft Defender XDR advanced hunting starter guide

How to start advanced hunting in the Microsoft Defender portal safely: who can run it, guided and advanced modes, which tables answer which questions, the quotas that decide whether results are complete, query habits, five starter hunts, joins, custom detections and how to keep hunting useful.

Prefer to have it done for you? IT Perfection provides Microsoft Defender for Business setup for companies in Irvine, Orange County and Los Angeles County.

Ali Hassani, CISSP and Certified CISO, IT PerfectionWritten by Ali Hassani, CISSP and C|CISO · 25+ years designing, securing and supporting business networks · Updated November 2026

IT analyst reviewing chart dashboards on two monitors
QuestionStart every hunt with one precise question.

Guides › IT and Security Tools Library › Endpoint protection › Advanced hunting starter

Where this tool sits in the IT toolset

  • Discover
  • Document
  • Monitor
  • Patch
  • Scan
  • Protect
  • Log
  • Investigate

Fact sheet

TopicAdvanced hunting in Microsoft Defender XDR
Query languageKusto Query Language (KQL), or guided mode
Default rangeUp to 30 days of native Defender data
Time zoneQueries in UTC
Facts checkedMicrosoft Learn, November 23, 2026
Why

What advanced hunting is, and what it is not

Advanced hunting is the query-based search tool in the Microsoft Defender portal. Microsoft describes it as a way to explore up to 30 days of raw Defender data, proactively inspecting events to locate threat indicators and entities. It covers data from Defender for Endpoint, Defender for Office 365, Defender for Cloud Apps and Defender for Identity, and from Microsoft Sentinel when a Sentinel workspace is connected to the Defender portal.

For a small or mid-sized business, the honest value is narrower than the marketing: advanced hunting lets you answer specific questions quickly. Did this file reach any other device? Which users clicked that link? Did anyone sign in to this server outside working hours last week? Which devices still have the vulnerable version of an app? Those questions come up during almost every incident and many audits, and the answers are already in the data.

What advanced hunting is not: it is not proof that something did not happen, not a replacement for the alerts Defender already raises, and not a place to run response actions casually. A query that returns nothing may mean nothing happened, or it may mean the data was not collected, the time range was wrong or the query was wrong. Most of this guide is about telling those apart.

Access

Who can run advanced hunting

Microsoft lists several routes to permission. In Microsoft Defender unified role-based access control (unified RBAC), access to the email and collaboration tables comes from the permission Security operations, Raw data, Email & collaboration metadata (read), and access to the alerts and behaviours tables comes from Security operations, Security data, Security data basics (read). Microsoft Entra roles Global Administrator, Security Administrator, Security Reader and Global Reader grant read access to all advanced hunting data, while access to endpoint data is still limited by Defender for Endpoint role-based access settings, including device groups.

RouteWhat it opensNote
Unified RBAC: Security data basics (read)Alerts and behaviours schemaPreferred for analysts
Unified RBAC: Email & collaboration metadata (read)Email tables such as EmailEvents and UrlClickEventsGrant only to people who need mail data
Email & collaboration role groups (Security Administrator, Security Operator, Security Reader)Email data tablesOlder permission model
Microsoft Entra roles (Global Administrator, Security Administrator, Security Reader, Global Reader)Read access to all advanced hunting dataBroad; keep these few

Because hunting reads raw activity about employees, including email metadata and sign-ins, treat the permission as sensitive. Give it by group, to named people, and review it alongside your other Defender roles. If device groups limit an analyst to certain devices, their endpoint results are limited too; our device groups and RBAC guide explains how that scoping works.

Ready

Before your first hunt

CheckHowWhy
Defender is turned on for the workloads you useSettings in the Defender portal; device inventory shows onboarded devicesNo data, no hunting
Devices report as healthy and activeDevice inventory health and last-seen datesUnhealthy sensors leave gaps
Your permission is the narrowest that worksUnified RBAC role assigned by groupHunting reads staff activity
Your Defender time zone is setSettings, General, Time zoneAvoids confusion when reading results
A shared folder for saved queries existsAdvanced hunting, Queries, Shared queriesStarts the library on day one
You know where hunt notes goThe incident record or your ticket systemEvidence stays with the case
Modes

Guided mode and advanced mode

Microsoft offers two ways to build queries. Guided mode is a query builder: you choose a data domain, add filters from lists and run it without writing Kusto Query Language (KQL). Advanced mode is a text editor for KQL, with the schema listed beside it.

ModeGood forLimits
GuidedLearning the tables, quick filters, people new to KQLFewer operators; switch to advanced mode to edit further
AdvancedJoins, aggregation, reusable queries, custom detectionsNeeds KQL; easier to write an expensive query

A sensible path for a small team: start in guided mode to see which table holds the data, switch to advanced mode once the shape is clear, then save the query so the next person does not start from nothing. Microsoft notes that if a query was built in guided mode, you switch to advanced mode to edit it from the query resources report.

Data

Event data, entity data and time zone

Microsoft separates advanced hunting data into two kinds. Event or activity data (alerts, process starts, sign-ins, file events, email events) arrives almost immediately after a healthy sensor sends it to the cloud. Entity data (information about users and devices, such as health status and tags) is refreshed every hour with the latest full record for each entity.

All advanced hunting data is stored and queried in UTC. Write your time filters in UTC; the portal converts results to the time zone set in your Defender settings. In an investigation that matters: a user who says “I opened it about 4 pm” in California is describing an event near midnight UTC; in winter it is already the next day in UTC. Write both times into your notes.

If you needLook atRemember
What happenedEvent tables (Device*, Email*, Identity*, CloudAppEvents)Near real time; 30 days by default
What a device or user is nowEntity tables such as DeviceInfo and IdentityInfoHourly refresh; take the latest record
When it happened locallyTimestamp converted in the resultsQueries are UTC
Tables

Choose the table that matches the question

QuestionStart withTypical key columns
What ran on a device?DeviceProcessEventsDeviceId, FileName, ProcessCommandLine, InitiatingProcessFileName, AccountName
Which files were created or changed?DeviceFileEventsDeviceId, FileName, FolderPath, SHA256, ActionType
What did the device connect to?DeviceNetworkEventsDeviceId, RemoteIP, RemotePort, RemoteUrl, InitiatingProcessFileName
Who signed in to a device?DeviceLogonEventsDeviceId, AccountName, LogonType, ActionType, RemoteIP
What changed in the registry?DeviceRegistryEventsDeviceId, RegistryKey, RegistryValueName, ActionType
Other device activity, such as USB mounts or antivirus detectionsDeviceEventsDeviceId, ActionType, AdditionalFields
What email arrived?EmailEventsNetworkMessageId, SenderFromAddress, RecipientEmailAddress, ThreatTypes
What was attached or linked?EmailAttachmentInfo, EmailUrlInfoNetworkMessageId, SHA256, Url
Who clicked a link?UrlClickEventsUrl, AccountUpn, ActionType
What happened in cloud apps?CloudAppEventsAccountObjectId, Application, ActionType
Directory and identity activityIdentityLogonEvents, IdentityDirectoryEvents, IdentityInfoAccountObjectId, AccountUpn, ActionType
What alerts fired and on what?AlertInfo, AlertEvidenceAlertId, Title, Severity, entity columns

Which tables you see depends on what you license and have turned on. A tenant with Defender for Business or Defender for Endpoint only will not have the identity or cloud app tables unless those products are in use. Before a hunt, open the schema pane and confirm the table exists and has recent rows; an empty table is a coverage problem, not a clean result.

Limits

Quotas that decide whether results are complete

30 daysNative Defender data you can query by default
100,000Rows a single query can return
64 MBSize of results before they are cut to partial
10 minLongest a query may run
15 minCPU quota refresh cycle for the tenant
Advanced hunting quotas as Microsoft lists them. They apply separately to manual queries and to custom detection rules.

Microsoft lists these service limits. The date range is up to 30 days for native Defender data, or up to 90 days for supported data with an eligible Integrated Security Operations Center (ISOC) license; Sentinel tables follow the workspace’s analytics-tier retention. Each query can return up to 100,000 rows and run for up to 10 minutes. Overall result size is capped at 64 MB; when a result goes over, the portal returns as many records as fit and shows a message that the results are partial. CPU resources are allocated by tenant size and refreshed every 15 minutes: the portal warns when the tenant uses over 10% of its allocation, and queries are blocked once it reaches 100% until the next cycle.

LimitWhat it means for an answerWhat to do
30-day date rangeYou cannot prove what happened before then from advanced hunting aloneSay so in the report; check other logs or streamed data
100,000 rowsA large result may be cutCount first; summarise; narrow the time or entity
64 MB result sizeMany wide columns can cut results earlyProject fewer columns
10-minute timeoutA heavy query fails rather than finishing lateFilter earlier; split the time range
CPU allocationHeavy queries can block other analysts and detectionsCheck the query resources report
Retention

Looking back further than 30 days

Thirty days is enough for most incident scoping, but not for every question. An audit asking whether a former employee copied files four months ago cannot be answered from advanced hunting alone. Microsoft describes three ways to extend the window: eligible Integrated Security Operations Center (ISOC) customers with a Microsoft Defender Suite, Microsoft 365 E5 or Microsoft 365 E7 license receive 90 days of included retention for supported Defender data; tables in a connected Microsoft Sentinel workspace follow that workspace’s analytics-tier retention; and the Defender streaming API can send data to external storage, with retention starting from the day streaming is turned on.

The last point matters: none of these options reaches back to data that was never kept. Decide how far back you need to look before the incident that needs it, and write that decision down along with what it costs. Our log retention policy guide covers how to set those periods.

Resources

The query resources report

Microsoft provides a query resources report that shows the tenant’s CPU consumption for hunting over the last 30 days, across the portal, custom detections and the API. Open it from the advanced hunting page (Query resources report) or from Reports, General. For each query it shows the time, the interface, the user or app, resource usage (Low, Medium or High), state (completed, failed or throttled), query time and the time range used.

All users can open the report, but only people with Microsoft Entra Security Reader or higher roles see queries run by everyone; others see their own portal and API queries and the custom detections they created. Review it monthly: a custom detection with High usage that runs every hour is the usual reason a small tenant suddenly gets throttled.

Shape

Filter early, project deliberately, join only narrowed data

Microsoft’s query guidance comes down to a few habits: size a new query with count, apply time and other filters early, prefer has to contains, search specific tables and columns rather than everything, avoid filtering on terms of three characters or fewer (they are not indexed), and project only the columns you need, especially before a join.

1. Size it first
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName =~ "powershell.exe"
| count
2. Filter and project the evidence
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName =~ "powershell.exe"
| where ProcessCommandLine has "-enc"
| project Timestamp, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessFileName
| order by Timestamp desc
3. Summarise for context
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName =~ "powershell.exe"
| where ProcessCommandLine has "-enc"
| summarize Runs=count(), Devices=dcount(DeviceId) by InitiatingProcessFileName
| order by Runs desc

Illustrative queries for learning. Column names follow Microsoft’s schema; check the schema pane in your tenant before relying on any query.

Use let to name stages so another person can follow the logic: first the narrowed set of suspicious events, then the context you join to it. A query that reads top to bottom like a sentence is far easier to review than one long line.

Command lines

Write durable queries for command lines

Attackers write the same command in many ways: with or without a path or file extension, with extra quotes and spaces, or with the arguments in a different order. Microsoft’s guidance is to match the program by its file name column rather than the whole command line, use case-insensitive matches, look for each important argument separately rather than one exact string, and strip quotes before matching.

Fragile versus durable (pattern from Microsoft guidance)
// Fragile: misses any variation
DeviceProcessEvents
| where ProcessCommandLine == "net stop MpsSvc"

// Durable: file name, separate arguments, quotes removed
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("net.exe", "net1.exe")
| extend Cmd=replace_string(ProcessCommandLine, '"', "")
| where Cmd contains "stop" and Cmd contains "MpsSvc"

The function parse_command_line() can split a command line into its parts for more complex cases. Durable queries take a few more lines, but they are the only kind worth saving to a library or turning into a detection.

Routine

A hunt routine from question to action

QuestionWrite one precise hypothesis and what would prove or disprove it.
PermissionConfirm you are allowed to look, and who will see the results.
CoverageCheck the data you need exists for the devices and time in question.
SizeCount first, then filter on time and key columns.
EvidenceProject only the columns that answer the question.
BaselineCompare with normal activity before calling anything unusual.
RecordSave the query, time range, row count and conclusion.
ActLink to an incident, raise a ticket, or turn into a detection.
Illustration: an eight-step hunt routine. Each step is short; skipping one is how hunts end in wrong conclusions.
StepWhat to write down
QuestionThe hypothesis in one sentence, for example: the invoice attachment sent on Monday ran on at least one device
PermissionWho asked, why, and whether HR or legal need to know because employee activity is involved
CoverageWhich tables you need and whether the devices in question were onboarded and healthy
SizeTime range in UTC and the row count before you add detail
EvidenceThe final query, the columns kept and why
BaselineHow often the same activity happens normally, for example on the last 30 days
RecordSaved query name, run time, row count, whether results were partial
ActIncident link, ticket, detection rule, or a note that nothing further is needed and why

Keep this record short. Five lines in the incident or ticket are enough, and they make the difference between “we looked” and evidence another analyst can repeat.

First hunts

Five starter hunts for a small business

These are common, low-risk questions. Each one is a starting point to adapt, not a finished detection.

Did a suspicious attachment reach anyone, and did it land on a device?
EmailAttachmentInfo
| where Timestamp > ago(7d)
| where FileName =~ "invoice_1123.html"
| project Timestamp, NetworkMessageId, RecipientEmailAddress, SHA256
| join kind=inner (DeviceFileEvents
    | where Timestamp > ago(7d)
    | project FileTime=Timestamp, DeviceName, FolderPath, SHA256) on SHA256
Who clicked a specific link?
UrlClickEvents
| where Timestamp > ago(7d)
| where Url has "example-login-page.test"
| project Timestamp, AccountUpn, ActionType, Url
Failed sign-ins to devices from outside the office
DeviceLogonEvents
| where Timestamp > ago(3d)
| where ActionType == "LogonFailed"
| where isnotempty(RemoteIP)
| summarize Failures=count() by DeviceName, AccountName, RemoteIP
| where Failures > 20
| order by Failures desc
USB drives mounted in the last day
DeviceEvents
| where Timestamp > ago(1d)
| where ActionType == "UsbDriveMount"
| project Timestamp, DeviceName, AccountName, AdditionalFields
Devices not seen recently
DeviceInfo
| where Timestamp > ago(30d)
| summarize LastSeen=max(Timestamp) by DeviceId, DeviceName, OSPlatform
| where LastSeen < ago(7d)
| order by LastSeen asc

Illustrative queries with sample file names and a sample domain (example-login-page.test). Replace them with the values from your own investigation.

Join

Correlate across tables without fooling yourself

RuleWhy
Put the smaller, filtered table on the left of a joinMicrosoft notes the left side is matched against the right; smaller left means less work
Use kind=inner when every match mattersThe default join flavour removes duplicate left-side rows by key, which can hide repeat events
Apply time filters on both sidesReduces records and keeps the relationship meaningful
Bound relationships in time, for example a sign-in within 30 minutes of an emailUnbounded joins link unrelated events
Join on stable identifiers (DeviceId, AccountObjectId, SHA256, NetworkMessageId)Display names and device names change and collide
On Windows, use ProcessUniqueId and InitiatingProcessUniqueId to link parent and child processesMicrosoft notes process IDs are reused
Parse fields such as AdditionalFields with parse_json only after filteringParsing is expensive
Sign-ins within 30 minutes of receiving malware (pattern from Microsoft guidance)
EmailEvents
| where Timestamp > ago(7d)
| where ThreatTypes has "Malware"
| project EmailTime=Timestamp, Subject, SenderFromAddress, AccountName=tostring(split(RecipientEmailAddress, "@")[0])
| join (DeviceLogonEvents
    | where Timestamp > ago(7d)
    | project LogonTime=Timestamp, AccountName, DeviceName) on AccountName
| where (LogonTime - EmailTime) between (0min .. 30min)

Note the weakness in that example: joining on the part of an email address before the @ only works if account names match mailbox names. In your own tenant, check that assumption before trusting the result, or join on an object ID where both tables have one.

Example

Worked example: scoping a phishing email in a 40-person office

A fictional design firm receives a report on Tuesday morning: an employee opened an attachment called Proposal_Review.html from an unfamiliar sender and was asked to sign in. Defender raised an alert on one laptop. The owner asks two questions: did anyone else get it, and did anyone else open it?

StepQuery or actionResult in the example
1. HypothesisThe same email reached other staff and at least one more person opened the attachmentWritten in the incident
2. CoverageConfirm EmailEvents, EmailAttachmentInfo, UrlClickEvents and DeviceFileEvents have recent rowsAll present
3. Who received itEmailAttachmentInfo filtered on the file name and the last 3 days6 recipients, one sender, one SHA256 hash
4. Where it landedJoin to DeviceFileEvents on SHA256Saved on 2 laptops
5. Who clickedUrlClickEvents for the sign-in domain in the attachment2 users clicked; 1 entered details per the user
6. BaselineSame sender domain over 30 daysNever seen before
7. RecordSave the queries; note time range in UTC and row countsAttached to the incident
8. ActOwner approves: reset passwords and revoke sessions for both users, remove the email from all mailboxes, block the senderDone; follow-up hunt on sign-ins for both accounts

The hunt took under an hour and answered the owner’s questions with evidence. It also produced a reusable query (“attachment to device by hash”) for the library.

Fictional example for illustration. Names, numbers and outcomes are not from any real client.

Meaning

Separate query output, interpretation, evidence and action

LayerWhat it isExample
Query outputRows returned, nothing more14 devices created a file with this hash
InterpretationWhat an analyst believes the rows meanThe attachment was saved by users; it may not have run
EvidenceWhat is recorded in the incident, with the queryQuery, time range, row count, screenshots or export
ActionWhat someone authorised and didTwo devices isolated after approval; file blocked

Keeping these layers apart protects everyone. A row in a result is not proof of malicious intent by an employee. If a hunt touches a person’s conduct rather than a technical threat, stop and involve whoever handles HR or legal matters before going further.

Detect

Turn stable hunts into custom detection rules

Microsoft lets you turn an advanced hunting query into a custom detection rule that runs on a schedule, raises alerts and can take response actions. Create one from advanced hunting with Create detection rule, or from the custom detection rules list. The wizard steps are General, Alert settings, Incident settings, Automated actions, Scope, and Review and create.

RequirementFrom Microsoft’s guidance
Columns in resultsReturn Timestamp (or TimeGenerated); for Defender for Endpoint tables include DeviceId and ReportId so alerts carry the right device group scope and the process tree builds
Impacted assetProject a strong identifier such as DeviceId, RecipientEmailAddress or AccountObjectId
Alert volumeEach rule can generate only 150 alerts per run; tune the query to avoid day-to-day activity
Time filterAvoid filtering custom detections on Timestamp; the service prefilters on the lookback
ScopeAll devices or specific device groups; editors need permission for every device group in scope
Email actionsNetworkMessageId and RecipientEmailAddress must be in the results to move or delete messages
Frequency (Defender data)Lookback Microsoft applies
Every 24 hours30 days
Every 12 hours48 hours
Every 3 hours12 hours
Every hour4 hours
Continuous (near real time)For single-table queries using supported operators, without joins or unions
Shape of a detection-ready query (pattern from Microsoft guidance)
DeviceEvents
| where ActionType == "AntivirusDetection"
| summarize (Timestamp, ReportId)=arg_max(Timestamp, ReportId), count() by DeviceId
| where count_ > 5
Gate

Gate automated actions carefully

A detection rule can take actions on matching devices, files, users or email. That is useful for well-understood threats and dangerous for anything new. Use a simple rule: new detections start with alerts only; actions are added only after the rule has run for a few weeks with no false positives, and only by someone with the authority to approve the effect.

Rule maturityAllowed actionReview
NewAlert onlyEvery alert reviewed by a person
Tuned (several weeks, no false positives)Low-impact actions, such as collecting an investigation packageWeekly
Trusted, with an owner and a rollback noteContainment such as isolating a workstationMonthly, and after each trigger
Servers and domain controllersAlert only, or approval-based actionsAgreed with the server owner
Govern

Give hunters visibility without uncontrolled data or response access

ControlPurpose
Separate hunting reader and responder permissionsReading data does not imply authority to isolate devices or delete email
Limit email metadata access to people who need itEmail tables reveal who talks to whom
Use device groups to scope endpoint data where neededA site or provider sees only its devices
Keep shared queries in a named, reviewed folderPrevents copies with silent errors from spreading
Record exports and where they are storedExported results are personal data and evidence
Peer review queries that support a conclusionA second person catches wrong time ranges and joins
Library

Build a small, owned query library

Advanced hunting lets you save queries for yourself or share them with the organisation. A small library of trusted queries is worth more than a large folder of copies from the internet.

Library itemContents
NameWhat it finds, for example “Email attachment to device by hash”
OwnerOne named person
Purpose and limitsOne or two lines, including tables needed and known blind spots
Last reviewedDate and reviewer
StatusDraft, trusted, or promoted to detection

Before saving a query found online, read it line by line, confirm every table and column in your schema, run it on a short time range and compare with what you expect. Microsoft also publishes sample queries in the portal and community queries on GitHub; treat them as starting points that need the same review.

Risks

Failures that create false confidence

FailureEffectPrevention
No written hypothesisEndless browsing and no conclusionOne sentence before the first query
No results read as no threatMissed activity when data was missingCheck coverage and a known-positive test
30-day boundary ignoredOlder activity assumed absentState the range in every conclusion
Partial results reported as completeWrong counts in reportsCheck row count and size messages
Time filter missing on one side of a joinSlow queries and false linksFilter both sides
Display names used as identityWrong person or deviceUse object IDs and DeviceId
Query copied without schema reviewSilently wrong columnsReview against the schema pane
Rows treated as maliciousUnfair conclusions about staffSeparate output from interpretation
Response before evidence is keptEvidence lostSave results and the query first
Hunt promoted straight to automated responseBusiness disruptionAlert-only stage first
Expensive queries running oftenThrottling for everyoneQuery resources report monthly
Measure

Measure whether hunting is worth the time

MeasureWhy it mattersTarget
Hunts with a written hypothesis and conclusionShows disciplineAll of them
Hunts that could be repeated by another analystReproducibilityAll recorded hunts
Time from question to useful evidencePractical speedFalling over time
Queries with High resource usageCost to the tenantFew, and each explained
Hunts turned into detectionsLasting valueSome each quarter
Detections with false positives last monthNoiseReviewed and tuned
Control changes made because of a huntThe real outcomeRecorded, for example a blocked file type or tighter sign-in policy
Cadence

A realistic schedule for a small team

How oftenActivityTime
During each incidentScope the incident: who else, which devices, what else ranAs needed
WeeklyTwo or three standing hunts from the library, such as unseen devices and USB useAbout 30 minutes
MonthlyReview custom detections and the query resources reportAbout an hour
QuarterlyOne themed hunt based on a current public advisoryHalf a day
Twice a yearReview hunting permissions and the query libraryAn hour

If nobody can give hunting this time, say so and decide deliberately: a managed detection and response provider may cover it, or you may rely on Defender’s built-in detections and use hunting only during incidents. Both are reasonable; pretending to hunt is not.

Connect

Where advanced hunting fits in the Defender routine

Want help setting up Defender hunting and detections?

IT Perfection sets up Microsoft Defender for companies in Irvine, Orange County and Los Angeles County. See Microsoft Defender for Business setup, or EDR deployment and management.

Ali Hassani, CISSP and Certified CISO, IT Perfection

Who does the work

Written by Ali Hassani, CISSP, C|CISO

Ali Hassani has 25+ years of hands-on experience in IT operations, cybersecurity, Microsoft infrastructure, network security and Azure, and works with businesses in Irvine, Orange County and Los Angeles County. Design, implementation and troubleshooting work is planned and reviewed by Ali personally.

This guide is for education and planning. It does not replace a professional audit, compliance assessment or vendor engineering review. Updated November 2026.

ISC2 CISSP badgeEC-Council Certified CISO (C|CISO) badgeCisco CCNP Routing and Switching badgeMCSE: Server Infrastructure badgeMicrosoft MCSE badgeMCSA: Security badgeCisco CCNA Cybersecurity badgeMCITP badge

Defender XDR advanced hunting FAQ

What is advanced hunting?

A query-based search tool in the Microsoft Defender portal for exploring raw Defender data, by default up to 30 days, to find threat indicators and answer investigation questions.

Do I need to know KQL?

No. Guided mode builds queries without code. KQL in advanced mode gives more control, and most teams learn it gradually.

How far back can we search?

Microsoft lists up to 30 days for native Defender data, or up to 90 days for supported data with an eligible ISOC license; Sentinel tables follow the workspace retention.

Why did my query return partial results?

Results are capped at 100,000 rows and 64 MB. Project fewer columns, summarise, or narrow the time range.

What time zone does advanced hunting use?

UTC for all data and queries. Results are shown in the time zone set in Defender settings.

Can a hunting query run automatically?

Yes, as a custom detection rule on a schedule, raising alerts and optionally taking actions. Start with alerts only.

Can IT Perfection help us set this up?

Yes. We set up Microsoft Defender for companies in Irvine, Orange County and Los Angeles County. Call 949-777-5567 or use the contact page.

Sources

Read on November 23, 2026 (Microsoft Learn):

Microsoft changes Defender often; check Microsoft Learn before relying on a limit or setting. Queries on this page are illustrations. This guide is independent and is not endorsed by Microsoft.

Would you rather hand this off?

Microsoft Defender XDR setup and hunting starter pack

We set up Microsoft Defender XDR so alerts reach the right people, then build a small set of hunting queries your team can run every week.

  • Review of your Defender licensing, onboarding and alert settings
  • Starter hunting queries for sign-ins, email and endpoints, saved in your tenant
  • Written notes on what each query looks for and what to do with the results

Each project has a written scope and a written quote before any work starts.

Need this done for your business?

IT Perfection plans, installs and supports this for companies in Irvine and Orange County

The guides explain the steps. If you would rather have it done, planned and documented by an experienced engineer, these are the services that cover it. Design, implementation and troubleshooting work is planned and reviewed by Ali Hassani personally.

Microsoft Intune management

Laptops and phones enrolled, configured and secured from one console.

View service

Endpoint security, EDR and MDR

Endpoint protection deployed, tuned and watched on every device.

View service

Endpoint and patch management

Windows and application updates tested and installed on schedule.

View service