How to get report of mail by sender for particular O/M365 mailbox

Darren Rose 496 Reputation points
2021-01-29T21:11:08.043+00:00

Hi

I have a mailbox used for archiving which is massive, I need to run a report either from admin center or powershell perhaps to get a report to show me the volume of email per sender in that mailbox (e.g. email received in that particular inbox sorted / grouped by sender email, so I can see count of how many and size per sender address)

Looked through some of the reports in O/M365 admin centers but can't seem to find what I need

Any thoughts please

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,224 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,391 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 45,096 Reputation points
    2021-01-29T22:19:43.21+00:00

    If this were an on-prem Exchange you could use the Get-Message cmdlet. Unfortunately, that won't work with M365. I don't think there's any equivalent (like a "Get-EXOMessage") for M365.

    You can try using Invoke-RestMethod (but I believe that's limited in the number of messages it can retrieve in one invokation), or resort to using Outlook (and MAPI) from your workstation. If you're adventurous, you can try using the Exchange Web Services (EWS). I believe the most recent version of that is 2.2.

    See if this (as a starting place) is any help if you want to use Outlook: powershell-office-365-emils.html


  2. Lucas Liu-MSFT 6,161 Reputation points
    2021-02-01T10:16:44.097+00:00

    Hi @Darren Rose ,
    Do you know the email address of each sender? If you know it, you can create an eDiscvoery case in Microsoft 365 compliance to search for a specific Office 365 mailbox based on the sender’s email address as the search criteria. But it should be noted that to use this feature, you need to have the appropriate license and be assigned the eDiscovery permission.
    Regarding how to use Core eDiscovery and how to search for content in Core eDiscovery cases, Microsoft has given a detailed step-by-step introduction. You can refer to the following articles: Get started with Core eDiscovery, Search for content in a Core eDiscovery case and Keyword queries and search conditions for Content Search and eDiscovery

    The following screenshot shows that I searched the mails with the sender "Lucas" from the specified mailbox:
    62408-5.png

    ----------

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.