Skip to content
iBlockSpam
Running email day to day

How do you run a message trace in Microsoft 365?

By iBlockSpam Team How we check our guides Updated 11 min read 8 sources
Short answer

Open the Exchange admin center, go to Mail flow > Message trace (admin.exchange.microsoft.com/#/messagetrace) and select Start a trace. Enter the sender, recipient and time range, then open a result to see its delivery status and message events. You can search 90 days back, but only 10 days at a time for instant results.

When someone says "I never got that email", message trace is the first place to look. It shows whether Microsoft 365 received the message, what its filters did with it and where it ended up. This guide covers where to find it at the time of writing (November 2026), how to read the results, the PowerShell cmdlets that replaced the old ones, and the Microsoft Graph API for automation.

Where is message trace in Microsoft 365?

Message trace lives in the Exchange admin center (EAC). Go to admin.exchange.microsoft.com, then Mail flow > Message trace, or open https://admin.exchange.microsoft.com/#/messagetrace directly (Microsoft Learn).

You can also start from the Microsoft Defender portal at security.microsoft.com: go to Email & collaboration > Exchange message trace. Microsoft calls that page "a really pass through" to the EAC page (Microsoft Learn), so you end up in the same tool.

What permissions do you need?

You need an admin role. For the EAC, Microsoft lists the Organization Management role group in Exchange Online, or the Exchange Administrator role in Microsoft Entra ID. The Defender portal page also lists the Compliance Management and Help Desk role groups and the Compliance Administrator role. Microsoft advises against using Global Administrator for routine work, because it's a highly privileged role meant for emergencies. Regular users can't run a trace on their own mail.

What changed with the new message trace?

The new message trace began rolling out to general availability in June 2025. Microsoft said the old trace page and the old Get-MessageTrace and Get-MessageTraceDetail cmdlets would start deprecating for worldwide customers on September 1, 2025 (Microsoft Tech Community). A January 22, 2026 update to the same post announced that message trace through the Microsoft Graph API was generally available, and scheduled the retirement of legacy message trace in the Reporting Webservice for April 8, 2026. Microsoft also said the worldwide timeline doesn't apply to GCC, GCC-High, DoD or other sovereign clouds. If you have old screenshots or scripts, expect differences.

Item Old (deprecated) New
Portal Classic message trace page Mail flow > Message trace in the new EAC
PowerShell Get-MessageTrace, Get-MessageTraceDetail Get-MessageTraceV2, Get-MessageTraceDetailV2
Instant search window Last 10 days Last 90 days, 10 days per query
Paging -Page and -PageSize No pagination; -ResultSize up to 5,000, then query in rounds
API Reporting Webservice MessageTrace (retirement began April 8, 2026) Microsoft Graph messageTraces

How do you run a message trace?

To run a message trace in Microsoft 365, open the Message trace page in the EAC, select Start a trace, enter the sender and recipient, choose a time range and report type, and select Search. The full procedure:

  1. On the Message trace page, select Start a trace. The default searches all senders and recipients for the last two days.
  2. In Senders and Recipients, enter addresses. External addresses work, and a single wildcard such as *@contoso.com is allowed, but not multiple wildcards in one value. You can paste a list separated by semicolons, spaces or new lines.
  3. Set the Time range. The slider covers up to 90 days, or switch to Custom time range to set a time zone and exact start and end times.
  4. Optionally open Detailed search options to filter by subject (starts with, ends with or contains), delivery status, Message ID, Network Message ID, direction or original client IP address.
  5. Choose a Report type (see below) and select Search, or Next for downloadable reports.
  6. Select a row in the results to open its details.

The Autosaved queries tab keeps your last 10 searches, and the Custom queries tab holds queries admins saved on purpose. That's handy when you're going back and forth with a user. A query saved in Slider view keeps a relative range, such as "the last two days", while a Custom time range query keeps the exact dates.

Which report type should you pick?

Pick the Summary report for anything in the last 10 days, because it's the only one that appears on screen right away. Use the downloadable reports for longer ranges or when you need routing detail.

Report Time range Max results How you get it
Summary 10 days or less 20,000 On screen, almost immediately
Enhanced summary Any, up to 90 days 100,000 CSV download, can take several hours
Extended Any, up to 90 days 1,000 CSV download, can take several hours

Microsoft says "you can only query 10 days' worth of data at a time" for the instant Summary report. A range even slightly over 10 days produces a downloadable report from archived data. Enhanced and Extended reports also need a sender, recipient or Message ID, and Microsoft notes that the last 24 hours of archived data "isn't typically available" in them. So for anything recent, use Summary.

A few more limits matter in practice. A downloadable CSV can be up to 800 MB, and Microsoft warns that a file over that size can't be opened in Excel or Notepad. The notification address for a finished report must be in one of your accepted domains. The original client IP address is only kept for 10 days, and only appears in the Enhanced summary and Extended reports.

How do you read message trace results?

The Summary report lists each message with Date, Sender, Recipient, Subject and Status. Dates use the time zone set in your Exchange account settings, so check it before you tell a user "it arrived at 9:14". The page loads the first 250 results and fetches more as you scroll. You can sort by column, choose which columns to show, add saved filters, and use Export results to save what's on screen as a CSV.

What do the delivery statuses mean?

Microsoft defines these statuses (Microsoft Learn):

Status What it means What to do next
Delivered Delivered to the intended destination Check the user's Junk folder, inbox rules and other folders
Failed The message wasn't delivered Open the events to find the failure reason
Pending Delivery is being attempted or retried Wait, then check the Defer events
Quarantined Quarantined as spam, bulk or phishing Review it in quarantine
Filtered as spam Identified as spam and rejected or blocked, not quarantined Read the spam verdict before allowing anything
Expanded A distribution group was expanded to its members Trace the individual member
Recalled The message was recalled Ask the sender
Getting status Received, but no other status yet Check again in a few minutes

Microsoft notes a possible "five to ten minute delay" between the actual and reported status. Pending, Quarantined and Filtered as spam can only be used as filters in searches of less than 10 days. For older data with those filters, Microsoft points you to the Start-HistoricalSearch cmdlet.

If mail is arriving late rather than not at all, our guide to delayed Microsoft 365 email shows how to read Defer events and Received headers.

What are message events?

Message events are the step-by-step log of what Microsoft 365 did with one message. Open a row and expand Message events. The common events are Receive, Send, Deliver, Fail, Defer, Expand, Transfer, Resolved, DLP rule and Sensitivity label. Microsoft says even "an uneventful, successfully delivered message generates multiple Event entries."

Expand More information for the Message ID, the message size, From IP and To IP. From IP is the server that handed the message to Microsoft 365, and it's blank for outbound mail sent from Exchange Online. If your MX points to a filtering gateway, From IP should be the gateway, not the original sender. To work back from that address to the real origin, see how to trace an email sender's IP address.

To follow one message across forwarding, group expansion or mail flow rules, select the round check box next to it and choose Find related. Microsoft explains that "even a single message sent between two people can generate multiple records." Tenants with Defender for Office 365 Plan 2 also get View in Explorer and Go Hunting here, which open the message in Threat Explorer.

What are the most common findings?

Most traces end in one of five outcomes: delivered but not found, quarantined, filtered as spam, failed outbound, or not found at all. Each has a different next step.

The message was delivered, but the user can't find it

Delivered with a Deliver event means it reached the mailbox. From there, Microsoft's own filters may still have sent it to Junk, or a user's inbox rule may have moved or deleted it. Check the Junk folder and the user's rules. Our guide to Microsoft 365 emails going to Junk explains how to read the verdict in the headers. If a rule moved mail the user never set up, treat it as a possible compromise and work through signs an email account is compromised.

The message was quarantined

The trace confirms it, but the quarantine is where you act. Before releasing it, check the sender, links and authentication. Our guide to releasing quarantined email in Microsoft 365 covers the steps and what users can release themselves.

The message was filtered as spam

Get the reason before you add an allow entry. An Extended report includes a custom_data field. Values starting with S:SFA come from the spam filter agent and contain the same fields as the X-Forefront-Antispam-Report header, such as SFV=SPM and SCL=9 (Microsoft Learn). Values starting with S:AMA come from the malware filter and S:TRA from mail flow rules. Our Microsoft 365 spam headers explained guide decodes them, and the SCL entry in our glossary explains the scale.

Outbound mail failed

For mail your users sent, a Fail event usually comes with a bounce. Paste the error into the SMTP Error Code Lookup. Our guide to Microsoft 365 NDRs shows how to tell which server rejected the message. If every message from one user fails with 550 5.1.8, Microsoft has restricted that account, which our guide to a Microsoft 365 user blocked from sending covers.

Nothing shows up at all

If a search with the right addresses and a wide enough time range returns nothing, Microsoft 365 probably never accepted the message. Check:

  1. The address. One wrong character is enough. Paste addresses rather than typing them.
  2. The time zone. Widen the range by a day either side.
  3. The sender's bounce. If the sender's server was refused, they got a bounce, and it names the reason.
  4. Your MX record. An MX Lookup shows where mail for your domain goes. If you use a filtering gateway, check its logs too. The message may be held there.

Our broader checklist for why you're not receiving emails covers causes outside Microsoft 365.

How do you run a message trace in PowerShell?

Use Get-MessageTraceV2 and Get-MessageTraceDetailV2. Microsoft's reference for Get-MessageTrace now says it "is replaced by the Get-MessageTraceV2 cmdlet and will eventually be deprecated" (Microsoft Learn). The V2 cmdlets need version 3.7.0 or later of the Exchange Online PowerShell module.

Connect-ExchangeOnline
Get-MessageTraceV2 -SenderAddress john@contoso.com `
  -StartDate "10/25/2026" -EndDate "11/01/2026"

Dates use the short date format of the computer you run the command on, and output timestamps are in UTC. To search by subject, combine -Subject with -SubjectFilterType, which accepts Contains, StartsWith or EndsWith. Microsoft recommends StartsWith or EndsWith over Contains where possible.

Get-MessageTraceV2 -RecipientAddress anna@contoso.com `
  -Subject "Invoice" -SubjectFilterType StartsWith

To see events for a single message, pipe the result into the detail cmdlet, as Microsoft's own example does:

Get-MessageTraceV2 -MessageTraceId 2bbad36aa4674c7ba82f4b307fff549f `
  -SenderAddress john@contoso.com -StartDate "10/25/2026" -EndDate "10/27/2026" |
  Get-MessageTraceDetailV2

If you call Get-MessageTraceDetailV2 on its own, both -MessageTraceId and -RecipientAddress are required (Microsoft Learn). Its -Event filter accepts values such as RECEIVE, DELIVER, FAIL and DEFER.

What are the Get-MessageTraceV2 limits?

Key limits from the Get-MessageTraceV2 reference:

  • It searches "the last 90 days", but "you can only return 10 days worth of data per query."
  • With no parameters, it returns the last 48 hours only.
  • It returns 1,000 results by default and 5,000 at most (-ResultSize).
  • A tenant can make at most 100 queries in a rolling 5-minute window, counted separately for each of the two cmdlets.
  • -Status accepts Delivered, Expanded, Failed, FilteredAsSpam, GettingStatus, Pending and Quarantined.

How do you get more than 5,000 results?

Pagination isn't supported. Instead, rerun the same query with -EndDate set to the last result's received time and -StartingRecipientAddress set to its recipient. Results are sorted by received time (newest first) and then by recipient address, so this picks up where the last round stopped. Microsoft's sample:

$mt = Get-MessageTraceV2 -SenderAddress john@contoso.com
$next = Get-MessageTraceV2 -SenderAddress john@contoso.com `
  -EndDate $mt[-1].Received.ToString("O") `
  -StartingRecipientAddress $mt[-1].RecipientAddress

If you have old scripts that use -Page and -PageSize, rewrite them this way. -ResultSize replaces -PageSize.

Can you run a message trace with the Microsoft Graph API?

Yes. The Graph-based message trace API lets an app query message trace data from the last 90 days at GET https://graph.microsoft.com/beta/admin/exchange/tracing/messageTraces (Microsoft Learn). It suits scheduled reports and ticketing integrations better than a PowerShell session.

To set it up:

  1. Register an app in Microsoft Entra ID. Microsoft recommends a certificate from a trusted certificate authority over a client secret for production.
  2. Add the ExchangeMessageTrace.Read.All application permission for Microsoft Graph and grant admin consent.
  3. Provision a service principal in your tenant for Microsoft's application ID 8bd644d1-64a1-4d4b-ae52-2e0cbf64e373, for example with New-MgServicePrincipal. Provisioning can take several hours, and calls return 401 (Unauthorized) until it finishes.
  4. Request an access token and call the API, filtering with $filter on fields such as senderAddress, recipientAddress, status, subject and receivedDateTime.

The API follows the same rules as the cmdlets: 48 hours with no filter, 10 days per request, 1,000 results by default and up to 5,000 with $top, and 100 requests per 5 minutes per tenant. Unlike PowerShell, it does page, through @odata.nextLink. For per-message events, call getDetailsByRecipient with the trace ID and recipient address.

Which IDs should you search with?

The most precise search is by ID, and there are two:

  • Message ID comes from the Message-ID header (see Message-ID in our glossary). Microsoft says it stays constant for the lifetime of the message. Include the angle brackets when you search.
  • Network Message ID identifies one instance of a message inside Microsoft 365. You'll find it in headers such as X-MS-Exchange-Organization-Network-Message-Id, and the EAC now accepts it as a search option. PowerShell accepts it as -MessageTraceId. Microsoft says the MessageTraceId is required for complete results when a message went to more than 1,000 recipients.

Ask the user to send you the headers of a related message, or paste them into the Email Header Analyzer, which runs in your browser. Our guide on how to read email headers shows where each ID lives.

If the trace shows a phishing message reached many mailboxes, the trace only tells you who got it. To delete it everywhere, follow how to remove a phishing email from all mailboxes in Microsoft 365.

Next steps

  • Bookmark admin.exchange.microsoft.com/#/messagetrace and confirm your Exchange time zone setting.
  • Update any scripts still using Get-MessageTrace to Get-MessageTraceV2, replace -Page loops with -StartingRecipientAddress rounds, and move Reporting Webservice integrations to the Graph API.
  • For quarantined or spam-filtered mail, read the verdict before you add allow entries.
  • If you use a filtering gateway in front of Microsoft 365, its message history is the other half of the trace. iBlockSpam keeps 30 days of message history per domain, with quarantine and digests for each user.
  • Google Workspace admins have an equivalent tool, covered in Google Workspace Email Log Search.

Browse more guides on running email day to day.

Frequently asked questions

How far back can a Microsoft 365 message trace go?

90 days. In the Exchange admin center, searches of 10 days or less return an instant Summary report. Anything longer than 10 days becomes a downloadable CSV report built from archived data, which can take several hours. Get-MessageTraceV2 also covers 90 days but returns at most 10 days of data per query.

Where is message trace in the Defender portal?

In the Microsoft Defender portal, go to Email & collaboration > Exchange message trace. Microsoft describes this link as a pass-through: it opens the Message trace page in the new Exchange admin center, so the tool, options and results are the same in both places.

Is Get-MessageTrace deprecated?

Yes. Microsoft's reference says Get-MessageTrace is replaced by Get-MessageTraceV2 and will eventually be deprecated, and Microsoft began deprecating the old cmdlets for worldwide tenants on September 1, 2025. Use Get-MessageTraceV2 and Get-MessageTraceDetailV2, which need version 3.7.0 or later of the Exchange Online PowerShell module.

Why doesn't a message show up in message trace?

Usually the search is too narrow: wrong time zone, a typo in the address, or a time range that ends before the message arrived. If the sender's server never connected to Microsoft 365, there's nothing to trace, so ask the sender for their bounce. Very recent messages can also show Getting status for a few minutes.

What does Filtered as spam mean in message trace?

Microsoft defines it as a message identified as spam that was rejected or blocked, not quarantined. Open the message's details to see the events and, in an Extended report, the spam filter agent data, which includes the SFV and SCL values that explain the verdict.

Which admin roles can run a Microsoft 365 message trace?

For the Exchange admin center, Microsoft lists the Organization Management role group or the Exchange Administrator role. Its Defender portal page also lists the Compliance Management and Help Desk role groups and the Compliance Administrator role. Ordinary users can't trace mail themselves, and Microsoft advises against using Global Administrator for routine traces.

Sources

  1. Microsoft Learn: Message trace in the new EAC in Exchange Online
  2. Microsoft Learn: Message trace in the Microsoft Defender portal
  3. Microsoft Learn: Get-MessageTraceV2
  4. Microsoft Learn: Get-MessageTraceDetailV2
  5. Microsoft Learn: Get-MessageTrace (replaced by Get-MessageTraceV2)
  6. Microsoft Learn: Graph-based message trace API onboarding guide
  7. Microsoft Tech Community: Announcing General Availability (GA) of the New Message Trace in Exchange Online
  8. Microsoft Learn: Anti-spam message headers in Microsoft 365

See how your domain measures up

Run a free Email Health Check: MX, SPF, DKIM, DMARC and transport security in one scan, with the raw records shown. No sign-up.

Keep reading