How to run a mail trace in office 365

Running a mail trace in Office 365 can help you troubleshoot email delivery issues and identify the path an email took from the sender to the recipient. Here's how to do it:

Method 1: Using the Office 365 Admin Center

  1. Sign in to the Office 365 Admin Center with your admin credentials.
  2. Click on Show all in the top navigation menu.
  3. Click on Mail.
  4. Click on Mail flow.
  5. Click on Mail trace.
  6. Enter the email address or the message ID of the email you want to trace.
  7. Click Search.
  8. The mail trace results will display the path the email took, including any errors or issues that occurred during delivery.

Method 2: Using PowerShell

  1. Open PowerShell and connect to your Office 365 tenant using the following command: Connect-ExchangeOnline -UserPrincipalName <your_admin_email> -ShowProgress $true
  2. Run the following command to start the mail trace: Get-MailTrace -Identity <email_address> -IncludeReport
  3. Replace <email_address> with the email address of the email you want to trace.
  4. The command will return a report that includes the path the email took, including any errors or issues that occurred during delivery.

Method 3: Using the Exchange Online PowerShell module

  1. Install the Exchange Online PowerShell module if you haven't already: Install-Module -Name ExchangeOnline
  2. Import the module: Import-Module -Name ExchangeOnline
  3. Run the following command to start the mail trace: Get-MailTrace -Identity <email_address> -IncludeReport
  4. Replace <email_address> with the email address of the email you want to trace.
  5. The command will return a report that includes the path the email took, including any errors or issues that occurred during delivery.

Note: The mail trace feature is only available for Office 365 tenants that have a minimum of 50 users. If you have a smaller tenant, you may not have access to this feature.