Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Exchange / Checking Read (Unread) Status of Emails in Exchange

March 17, 2024

Checking Read (Unread) Status of Emails in Exchange

I have got a case recently: “Can we check an email status (read/unread) regardless of whether the Read Receipt is being enabled or disabled in Outlook, or if a user checked the read receipt?” In this article, we’ll talk about how to track email read status in on-premises Exchange Server and a few words about this feature in Exchange Online (Microsoft 365).

Why may you need to get the email read status?

  • If an email is crucial and you want to make sure that each employee has read it;
  • Many companies use newsletter mailings (like news/birthdays/documents) and you want to get statistics on how effective such mailings are.

Can you have an email read status in an Exchange mailbox regardless of whether a sender requested a read receipt?

Contents:
  • Tracking Read Status of an Email Message in Exchange Server
  • How to Check if a User Has Read an Email in Exchange Online (Microsoft 365)?

Tracking Read Status of an Email Message in Exchange Server

Let’s see how to get an email message read status in an on-prem Exchange Server mailbox. First of all, make sure that email read tracking is enabled in your Exchange organization:

Get-OrganizationConfig | Select ReadTrackingEnabled

True — enabled, false — disabled.

Enable the email read tracking using the command:

Set-OrganizationConfig -ReadTrackingEnabled $true

Only after running the command, read tracking data appear in the Exchange Server logs.

You can disable read status tracking for specific mailboxes (like, service or shared) using the command below:

Set-Mailbox [email protected] -MessageTrackingReadStatusEnabled $false

Then you need to get a message ID using the Get-MessageTrackingLog cmdlet:

Get-MessageTrackingLog -Sender [email protected] -MessageSubject "youremail subject" -Start (Get-Date).AddHours(-48) -EventId RECEIVE | Select MessageID

get message id from Get-MessageTrackingLog

In our example, an email from this sender with a specific subject was sent several times over the last 48 hours. You can apply different filters to get an exact MessageID.
However, you can make it easier: open the email in Outlook, click File — Properties, and find the Message-ID in the Internet Headers section.

excnange message id in outlook internet headers

Then open the Exchange Management Shell and run the Get-MessageReadStatusReport.ps1 (the script code is shown below). Specify a mailbox name and a MessageID.

Get-MessageReadStatusReport powershell

Thus, you get a CSV file with read statuses for the message in all user mailboxes. After an email has been delivered to the mailbox, two statuses are possible:

  • Read – The message is marked as Read in the user’s mailbox
  • Unread – The message is marked as Unread in the user’s mailbox

exchange get message read unread report with powershell

Here is Get-MessageReadStatusReport.ps1 script:
[CmdletBinding()]
param (
[Parameter( Mandatory=$true)]
[string]$Mailbox,
[Parameter( Mandatory=$true)]
[string]$MessageId
)
$output = @()
#Checking Exchange organization read tracking state
if (!(Get-OrganizationConfig).ReadTrackingEnabled) {
throw "Email tracking status is disabled"
}
#Getting an email ID
$msg = Search-MessageTrackingReport -Identity $Mailbox -BypassDelegateChecking -MessageId $MessageId
#There should be one message
if ($msg.count -ne 1) {
throw "$($msg).count emails found with this ID"
}
#Getting a report
$report = Get-MessageTrackingReport -Identity $msg.MessageTrackingReportId -BypassDelegateChecking
#Getting events
$recipienttrackingevents = @($report | Select -ExpandProperty RecipientTrackingEvents)
#Generating a list of recipients
$recipients = $recipienttrackingevents | select recipientaddress
#Getting an email status for each recipient
foreach ($recipient in $recipients) {
$events = Get-MessageTrackingReport -Identity $msg.MessageTrackingReportId -BypassDelegateChecking `
-RecipientPathFilter $recipient.RecipientAddress -ReportTemplate RecipientPath
$outputline = $events.RecipientTrackingEvents[-1] | Select RecipientAddress,Status,EventDescription
$output += $outputline
}
$output
$directory = "C:\PS\ExchangeReports"
$filename = 'ReadStatusReport'
$file = "$filename.csv"
#Exporting the report to CSV
$output | Export-Csv -NoTypeInformation -Append -Path "$directory\$file"

You can download this PowerShell script from my GitHub repo: https://github.com/maxbakhub/winposh/blob/main/Exchange/Get-MessageReadStatusReport.ps1

How to Check if a User Has Read an Email in Exchange Online (Microsoft 365)?

I tried to slightly modify this PowerShell script to get message read status in Exchange Online user mailboxes.

After connecting to my Microsoft 365 tenant using the Exchange Online PowerShell module, I checked to see if email read status tracking was enabled in Exchange Online. By default, messageTrackingReadStatusEnabled was enabled for all mailboxes in the tenant.

Get-EXOMailbox -Properties messageTrackingReadStatusEnabled|select UserPrincipalName,messageTrackingReadStatusEnabled

exchnage online (microsoft 365) get messageTrackingReadStatusEnabled

I edited the script, since the Get-MessageTrace and Get-MessageTraceDetail cmdlets are used for message tracking in Exchange Onlineinstead of Get-MessageTrackingLog and Search-MessageTrackingReport. Unfortunately, Get-MessageTraceDetail in Exchange Online didn’t allow me to get a message status. Microsoft may improve the features of Get-MessageTraceDetail cmdlet to the ones of on-prem Search-MessageTrackingReport in the future, but now it does not work.

So the only way to view the message read status in an Exchange Online mailbox is Microsoft Graph API. You need to check the isRead property of the email (https://docs.microsoft.com/en-us/graph/api/message-get?view=graph-rest-1.0&tabs=http).

0 comment
2
Facebook Twitter Google + Pinterest
Exchange
previous post
How to Install Windows 11 on Unsupported Hardware (Without TPM & Secure Boot)
next post
Converting UserAccountControl Attribute Values in Active Directory

Related Reading

Outlook Keeps Asking for Password on Windows

March 17, 2024

Get a List of Mailboxes a User Has...

March 15, 2024

How to Cleanup, Truncate or Move Log Files...

March 17, 2024

How to Manually Configure Exchange or Microsoft 365...

March 17, 2024

Fix: Microsoft Outlook Search Not Working on Windows...

March 17, 2024

How to Delete or Rename Default Mailbox Database...

March 17, 2024

Search and Delete Emails from User Mailboxes on...

March 15, 2024

How to Enable Maintenance Mode on Exchange Server

March 12, 2024

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016
  • Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell
  • How to Cleanup, Truncate or Move Log Files in Exchange Server 2013/2016/2019?
  • Fix: Microsoft Outlook Search Not Working on Windows 10/11
  • Export Exchange or Office 365 Global Address List (GAL) to CSV
  • Managing Calendar Permissions on Exchange Server and Microsoft 365
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top