How to create a Microsoft Office 365 shared mailbox activity report
As a Microsoft 365 admin, you may be called upon to create an Office 365 shared mailbox activity report. Shared mailboxes are used as archives that store the emails of users who are no longer with the organization. They are also used for customer communication and become a repository for customer feedback. If there is a lot of activity, it can mean there are issues with a product and too little activity could mean low engagement by customers.
While you can use native Microsoft 365 tools to generate reports, a comprehensive usage report on shared mailboxes is a manual process that is prone to errors. Luckily, there are a few alternative methods.
Using the Microsoft 365 Admin Centers
Let’s look at what you have in the various admin centers that can help you create an Office 365 shared mailbox activity report.
Microsoft 365 Usage Reports in the Admin Center
The Microsoft 365 Admin Center has several usage reports for Microsoft services including Exchange Online reports: Email activity, Email app usage, Mailbox usage. Unfortunately, these are mainly focused on user mailboxes.
When it comes to shared mailboxes, the Email Activity and Email App Usage reports do not include shared mailboxes. If you’ve converted some user mailboxes to shared mailboxes, you will find some information there, but it may be out of date. Also keep in mind that usage reports may have a 48-hour delay.
The last report, Mailbox Usage, does include shared mailboxes. In fact, you can toggle graph data to see shared mailboxes. More information on interpreting usage report data can be found on this page.
You will need to add the “Recipient type” column and sort its values to see the shared mailboxes at the top. If you’re creating a storage used report for your shared, you can export this list and remove all accounts that are not shared mailboxes.
Shared mailbox activity you won’t see in the Admin Center
Since the Email Activity report does not include shared mailboxes, you will not be able to see how many emails were sent or received for each mailbox, nor will you see their last activity date (unless these were user mailboxes at first as mentioned before).
Essentially, you will need access to all the shared mailboxes in order to see when an email was last sent or received.
See last sent or received emails by giving yourself access to shared mailboxes
To view emails in any mailbox, including shared mailboxes, you’ll need to add yourself as a delegate of those mailboxes. The good news is that you can do this easily in the Exchange Admin Center.
- Filter the view to only see shared mailboxes
- Select all and click “Mail Delegation”
- Give yourself full access as a delegate.
Once the mailboxes have been auto mapped to your mailbox, you can see them in the Outlook app (Outlook on the web requires you to add each mailbox manually), where you can look up each mailbox to take note of the last email sent and received.
Since this manual task can be very time-consuming and error prone as you take notes, you should resort to PowerShell scripting or a third-party tool like sapio365.
If you’re short on time, skip to the last section to see how easy it is with sapio365 to create an Office 365 shared mailbox activity report.
Creating an Office 365 shared mailbox activity report with PowerShell
I couldn’t NOT include a PowerShell section because some administrators may want to try their hand at scripting the manual steps in the Microsoft Admin Center.
Your script would have to include:
1. Get a list of shared mailboxes.
Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails SharedMailbox
2. Add yourself as a delegate with full access to those mailboxes.
Add-MailboxPermission -Identity “Name of shared mailbox” -User “Your name” -AccessRights FullAccess -InheritanceType All
3. Retrieve the last emails for each mailbox.
Here you can use Graph PowerShell to get the last email for each mailbox using $top1 to limit to the latest email received or sent. Make sure you add the necessary permission scopes. The API to use is the following:
GET https://graph.microsoft.com/v1.0/users/{user ID}/messages?$top=1
Of course, you would need to have pretty good PowerShell and Graph API skills, and the patience of a saint!
Create an Office 365 shared mailbox activity report with sapio365
A 3rd-party tool like sapio365 is a great PowerShell alternative for creating an Office 365 shared mailbox activity report. sapio365 gives you a full and extensive view of all your users in one place. With this view, you can drill down into the details you need, sort, filter and organize the data using the many filters and parameters available. It also allows you to preview your data before you make any changes permanent. You can even save your customized view for the next time you need to run the same report or schedule the report to run automatically at the frequency you choose.
What’s more, with sapio365 you won’t need to give yourself full access permission to mailboxes since a sapio365 elevated session (only available to global admins) uses an application that has the necessary permissions.
With sapio365, it’s simply 3 steps, where at any point you can rearrange and export a view:
- Isolate shared mailboxes to select them
- Retrieve emails
- Customize your report
1 – Isolate shared mailboxes by creating a custom view
- Start by retrieving all users in the main sapio365 window where you will see have all user account properties in one place. You can add information as you need it, including mailbox properties. You can customize your view by adding or removing columns (drag to the trash can icon).
- Switch to the view “Mailbox info – shared, forwarding, send as, on behalf of” to show some common mailbox property columns. You’ll be asked to authenticate when you load the information if you haven’t done so before.
- Sort or filter on the column by right-clicking on its header.
2 – Retrieve the last 5 emails sent or received for each shared mailbox
- Select all shared mailboxes by clicking CTRL A and retrieve their email messages with the “Messages” button.
- At the bottom of the settings, limit the number of emails to 5. This will speed up the process.
3 – Create your customized Office 365 shared mailbox activity report
- Group by mailbox, and then by folder path to categorize emails. Tip: Filter out folders other than “Sent” and “Inbox” by using the value filter from the right-click menu (right-clicking on the column header).
- Select a cell in the “Created” column to bring it into focus and click on “Totals-> Maximum” from the “Grouping” tab in the ribbon to display the latest date.
- Collapse all for a summarized view of the mailboxes and the last activity date. You can export it to Excel at this point.
- Note the first few columns with an arrow in the header. These properties were transferred to this view from the Users view. I chose information about “Send as” and “Send on behalf of” delegation but you can choose other properties. Here’s a page that explains how.
If you want to see mailboxes that have no email activity, you can include them by clicking “Empty” in the ribbon (1 in image below). If the view is too high-level for you, and you want to see the last received and last sent dates, you can expand the groupings to level 1 (2 in image below).
Summary
Monitoring activity on shared mailboxes is not always obvious and preparing an Office 365 shared mailbox activity report can be done in a few different ways.
Although native Microsoft 365 tools provide a report on mailbox usage, the Microsoft 365 Mailbox Usage report does not include last used information for shared mailboxes, which means you must examine access on those mailboxes. You must give yourself Full Access on the shared mailboxes to see emails, and then remember to remove yourself.
But the bigger issue is that manually collating information (from the mailboxes) is a tedious task and error prone.
If you choose to use PowerShell, the scripting is advanced and you must process CSV data after exporting the data.
Finally, you can use sapio365 to create an Office 365 shared mailbox activity report. It’s a tool that allows you to see active and inactive shared mailboxes in one report. It’s a quick and easy way to create the exact view you need before exporting it to Excel to send to managers. There are many features and capabilities to discover in sapio365 that allow you to save hours of time every day.
blog_sapio365
Submit a comment