Monthly number of sent and received emails in 250 'shared mailboxes'

%3CLINGO-SUB%20id%3D%22lingo-sub-3298702%22%20slang%3D%22en-US%22%3EMonthly%20number%20of%20sent%20and%20received%20emails%20in%20250%20'shared%20mailboxes'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3298702%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20guys.%20We%20use%20Exchange%20Online%20-%20as%20the%20title%20says%3B%20I%20need%20to%20get%20the%20email%20count%20-%20sent%20and%20received%2C%20for%20a%20specific%20list%20of%20shared%20mailboxes%20around%20250%2C%20the%20list%20is%20available%20in%20a%20csv%20file%20or%20spreadsheet.%20The%20count%20needs%20to%20be%20on%20a%20monthly%20basis(number%20of%20emails%20sent%20and%20received%20in%20any%20given%20month)%2C%20going%20back%20to%20January%202021.%20I%20don't%20want%20a%20report%20for%20all%20mailboxes%20on%20our%20tenant%20as%20our%20tenant%20is%20huge%2C%20with%20over%20100k%20users.%20What%20is%20the%20best%20way%20to%20achieve%20this%3F%3CBR%20%2F%3E%3CBR%20%2F%3E250(number%20of%20mailboxes)%20*%2015(months)%20*%202(sent%20%26amp%3B%20received)%20%3D%207500%20-%20that's%20the%20number%20of%20separate%20content%20searches%20it%20would%20take%20to%20achieve%20this%2C%20which%20is%20a%20ridiculous%20number.%20Is%20there%20a%20more%20efficient%20way%20to%20do%20this%3F%20TIA.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20PowerShell%20bulk%20content%20searches%20-e.g.%207500%2C%20this%20is%20the%20recommended%20method%20by%20MS%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fcreate-report-on-and-delete-multiple-content-searches%3Fview%3Do365-worldwide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fcreate-report-on-and-delete-multiple-content-searches%3Fview%3Do365-worldwide%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3298702%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOutlook%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3299531%22%20slang%3D%22en-US%22%3ERe%3A%20Monthly%20number%20of%20sent%20and%20received%20emails%20in%20230%20'shared%20mailboxes'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299531%22%20slang%3D%22en-US%22%3EIt%20won't%20help%20you%20after%20the%20fact%2C%20but%20you%20need%20to%20predict%20your%20data%20requirements.%20I%20can%20show%20what%20my%20mail%20flow%20rules%20have%20been%20doing%20for%20the%20last%20year%20because%20I%20run%20statistics%20at%20the%20end%20of%20each%20week.%20If%20you%20want%20a%20quarterly%20picture%20of%20submissions%2C%20remediations%20or%20any%20other%20ephemeral%20statistic%2C%20your%20only%20option%20is%20to%20record%20it%20in%20preparation%20for%20the%20unknown%20day%20when%20you%20need%20it.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3298894%22%20slang%3D%22en-US%22%3ERe%3A%20Monthly%20number%20of%20sent%20and%20received%20emails%20in%20230%20'shared%20mailboxes'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3298894%22%20slang%3D%22en-US%22%3EGood%20luck%20with%20that%20%3A)%3C%2Fimg%3E%3CBR%20%2F%3E%3CBR%20%2F%3ENone%20of%20the%20built-in%20tools%20(reports%2C%20message%20trace%2C%20reporting%20web%20service%2C%20etc)%20goes%20back%20that%20far%2C%20so%20you're%20indeed%20left%20with%20mining%20mailbox%20content.%20I'd%20strongly%20suggest%20you%20consider%20using%20an%20EWS%20or%20Graph%20API-based%20approach%20instead%20of%20Content%20searches%2C%20it%20will%20be%20much%20faster.%20There%20are%20readily%20available%20script%20samples%20to%20get%20the%20number%20of%20items%20within%20specific%20folders%2Fover%20specific%20timeframe%2C%20find%20the%20one%20that%20best%20suits%20your%20needs%20and%20work%20with%20it.%3C%2FLINGO-BODY%3E
Regular Visitor

Hi guys. We use Exchange Online - as the title says; I need to get the email count - sent and received, for a specific list of shared mailboxes around 250, the list is available in a csv file or spreadsheet. The count needs to be on a monthly basis(number of emails sent and received in any given month), going back to January 2021. I don't want a report for all mailboxes on our tenant as our tenant is huge, with over 100k users. What is the best way to achieve this?

250(number of mailboxes) * 15(months) * 2(sent & received) = 7500 - that's the number of separate content searches it would take to achieve this, which is a ridiculous number. Is there a more efficient way to do this? TIA.

 

For PowerShell bulk content searches -e.g. 7500, this is the recommended method by MS:

https://docs.microsoft.com/en-us/microsoft-365/compliance/create-report-on-and-delete-multiple-conte...

2 Replies
Good luck with that :)

None of the built-in tools (reports, message trace, reporting web service, etc) goes back that far, so you're indeed left with mining mailbox content. I'd strongly suggest you consider using an EWS or Graph API-based approach instead of Content searches, it will be much faster. There are readily available script samples to get the number of items within specific folders/over specific timeframe, find the one that best suits your needs and work with it.
It won't help you after the fact, but you need to predict your data requirements. I can show what my mail flow rules have been doing for the last year because I run statistics at the end of each week. If you want a quarterly picture of submissions, remediations or any other ephemeral statistic, your only option is to record it in preparation for the unknown day when you need it.