Email Search Issues

How to Count Daily Emails in a Microsoft 365 Shared Mailbox

Huma Ashraf ChHuma Ashraf Ch Sep 30, 2026 870 views

Question details

The user needs to generate a comprehensive daily report of incoming and outgoing messages (both internal and external) for a Microsoft 365 shared mailbox, overcoming standard automation limits.

How to Count Daily Emails in a Microsoft 365 Shared Mailbox
Product
Microsoft 365 / Exchange Online
Device & OS
not provided
Scenario
Generating accurate daily email volume reports for shared organizational mailboxes.
Observed behavior
Standard retrieval methods, such as basic Power Automate flows, face pagination and query limits, preventing the complete retrieval and accurate counting of daily emails.
Before you start

Ensure you have Exchange Administrator or Global Administrator permissions in your Microsoft 365 tenant, as querying complete mailbox statistics and running message traces requires elevated administrative privileges.

Solution 1Recommended

Use Exchange Online PowerShell (Recommended)

PowerShell provides the most reliable and unlimited way to query complete email traffic data, allowing you to filter by date and export the results for detailed analysis.

Using the Get-MessageTrace cmdlet is the preferred administrative method because it bypasses the UI limitations and standard API pagination limits.

1
Connect to Exchange Online

Open PowerShell as an Administrator and run 'Connect-ExchangeOnline' to authenticate with your Microsoft 365 administrator credentials.

2
Run the Message Trace Cmdlet

Execute the 'Get-MessageTrace' command, specifying the shared mailbox address with the '-RecipientAddress' or '-SenderAddress' parameters, and set the '-StartDate' and '-EndDate' to the desired 24-hour period.

3
Export the Results

Pipe the results to the 'Export-Csv' cmdlet to save the trace data locally (e.g., Get-MessageTrace ... | Export-Csv -Path 'C:\EmailReport.csv').

Use Exchange Online PowerShell (Recommended)
Filtering Tip: Once exported, you can easily sort the CSV by sender and recipient domains to distinguish between internal traffic and external emails.
Free Microsoft Office alternative

Analyze Your Exported Email Reports with WPS Office

Once you have exported your Microsoft 365 shared mailbox data to a CSV file using Message Trace or PowerShell, you need a powerful spreadsheet tool to filter, count, and format the results. WPS Office provides a lightweight, highly compatible, and completely free alternative to Microsoft Office, making it incredibly easy to analyze your message trace data.

  1. 1. Open your CSV Report: Launch WPS Spreadsheet and open the CSV file you exported from the Microsoft 365 message trace.
  2. 2. Apply Data Filters: Select the header row, navigate to the Data tab, and click 'Filter' to easily sort through sender and recipient domains.
  3. 3. Create a PivotTable: Go to the Insert tab and select 'PivotTable' to quickly generate a summary count of daily internal and external emails.
Seamless compatibility with Microsoft Excel (.xlsx) and CSV formats for opening your exported email reports.Advanced data filtering and PivotTables to easily separate and count internal vs. external email domains.Completely free, lightweight installation with a familiar tabbed interface for a smooth workflow.
microsoft office alternative - wps office

Frequently Asked Questions

How long is message trace data available in Microsoft 365?

Standard message trace data is available for 10 days. If you need to search further back, you can request an extended historical message trace, which can retrieve data up to 90 days old.

How do I distinguish between internal and external emails in the exported report?

In your exported CSV report, look at the sender and recipient domains. If both domains match the accepted domains registered in your Microsoft 365 organization, the email is internal. If one of the domains belongs to an outside party, it is an external email.

Can a standard user count daily emails in a shared mailbox without admin rights?

Standard users cannot run organizational message traces or Exchange PowerShell commands. However, if they have Full Access permissions to the shared mailbox, they can manually search within Outlook or use Outlook rules to move and count incoming items.