In my last article, I explained how to troubleshoot email delivery in Microsoft 365 (formerly Office 365) in the portal. Today, I will show you how to trace emails in Microsoft 365 with PowerShell if users complain that they didn't receive certain emails.

Tracing message with Get-MessageTrace

This is the basic level of the message trace and can be run as follows: First, launch Exchange PowerShell v2 and then connect it to your Microsoft 365 tenant:

Connect-ExchangeOnline -UserPrincipalName <Admin email address>

Enter the password for this admin account in the next window that pops up.

Get-MessageTrace -RecipientAddress -StartDate 4/21/2021 -EndDate 4/22/2021 | FL
A message trace example

A message trace example

Trace a specific message with Get-MessageTraceDetail

The Get-MessageTraceDetail command can be used to track a specific email. As seen here, the output is a bit more detailed. However, this command has the MessageTraceId and Recipientaddress attributes as mandatory.

Get-MessageTraceDetail -MessageTraceId f9b1b252-cd14-4f68-0286-08d904b784d1 -RecipientAddress
Track a specific email with emaiGet MessageTraceDetail

Track a specific email with emaiGet MessageTraceDetail

Get-MessageTraceDetail -MessageTraceId f9b1b252-cd14-4f68-0286-08d904b784d1 -RecipientAddress | FL
Track a specific email with emaiGet MessageTraceDetail 2

Track a specific email with emaiGet MessageTraceDetail 2

Extended message trace

You should also be familiar with the method of running an extended message trace via PowerShell. First, connect PowerShell to your Microsoft 365 tenant and then you can run an extended message trace with this command:

Start-HistoricalSearch -ReportTitle ExtendedMessageTrace -StartDate 4/1/2021 -EndDate 4/21/2021 -ReportType MessageTraceDetail -NotifyAddress <email address to be notified> -SenderAddress <email address> -RecipientAddress <email address>

To confirm that the search has been carried out, you can run Get-HistoricalSearch:

Search has been carried out

Search has been carried out

Once the report is generated, it will be sent to the notify address mailbox.

Subscribe to 4sysops newsletter!


As Microsoft 365 evolves, the number of ways to track email keeps changing. Thus, whenever emails don't arrive in your users' inboxes, you should check what other options Microsoft provides to trace emails.

1 Comment
  1. badsector 2 years ago

    How can I check to which folder in outlook the message was delivered?

Leave a reply

Your email address will not be published. Required fields are marked *


© 4sysops 2006 - 2023


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account