Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

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

February 7, 2022 Exchange

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 support@woshub.com -MessageTrackingReadStatusEnabled $false

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

Get-MessageTrackingLog -Sender support@woshub.com -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 for 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 Online instead 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
1
Facebook Twitter Google + Pinterest
previous post
“Could Not Find This Item” While Deleting a File/Folder in Windows
next post
Converting UserAccountControl Attribute Values in Active Directory

Related Reading

Send from Alias (SMTP Proxy Address) in Exchange...

April 6, 2023

How to Use Plus Addressing in Microsoft 365...

April 5, 2023

Save Sent Items in Shared Mailbox on Exchange...

April 3, 2023

Exchange Offline Address Book Not Updating in Outlook

March 21, 2023

How to Block Sender Domain or Email Address...

February 15, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configuring Event Viewer Log Size on Windows

    May 24, 2023
  • How to Detect Who Changed the File/Folder NTFS Permissions on Windows?

    May 24, 2023
  • Enable Single Sign-On (SSO) Authentication on RDS Windows Server

    May 23, 2023
  • Allow Non-admin Users RDP Access to Windows Server

    May 22, 2023
  • How to Create, Change, and Remove Local Users or Groups with PowerShell?

    May 17, 2023
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

    May 16, 2023
  • View Success and Failed Local Logon Attempts on Windows

    May 2, 2023
  • Fix: “Something Went Wrong” Error When Installing Teams

    May 2, 2023
  • Querying Windows Event Logs with PowerShell

    May 2, 2023
  • Configure Windows LAPS (Local Administrator Passwords Solution) in AD

    April 25, 2023

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016?
  • FAQ: Licensing Microsoft Exchange Server 2019/2016
  • Whitelist Domains and Email Addresses on Exchange Server and Microsoft 365
  • Moving Exchange Mailboxes to Different Database
  • How to Cleanup, Truncate or Move Log Files in Exchange Server 2013/2016/2019?
  • Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell
Footer Logo

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


Back To Top