Shared Mailboxes Activity Report

Excel
Excel used Ask the Experts™
on
We're looking to audit our shared mailboxes and see a date in which they were last accessed. We have 77 shared mailboxes but I can't find a way to do this via Office 365 or via PowerShell. Am I missing a simple way to do this or is there no way to do this yet?

Ideally, we'd like the report to show when the shared mailbox was last accessed/used so we can determine if we can close them or not.

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Saif ShaikhServer engineer

Commented:
If you are using o365 then you can follow below instructions to configure reports as per your needs.

https://docs.microsoft.com/en-us/office365/admin/activity-reports/activity-reports?view=o365-worldwide

Also How to detect who was accessing shared mailbox.
Open PowerShell → Run the following command to connect with Exchange Online instance and enter your credentials in the pop-up window:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

To enable mailbox auditing run:
 For a single mailbox:

Set-Mailbox –Identity "TestUser" -AuditEnabled $true

 For all mailboxes:

$UserMailboxes = Get-mailbox -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $UserMailboxes | ForEach {Set-Mailbox $_.Identity -AuditEnabled $true}

To check what mailboxes have auditing enabled run:
Get-Mailbox | FL Name,AuditEnabled

Open Exchange Administration Center → Navigate to "Compliance Management" Auditing.
Click "Run a non-owner mailbox access report". You will get the report on non-owner access to all mailboxes with enabled auditing over the past two weeks.
To view non-owner access to a specific mailbox Click on a mailbox to view all non-owner access events with the details.
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
There's no built-in report that covers this for Shared mailboxes, you either have to use a third-party tool or build your own report via PowerShell or the Graph API. Harvesting the audit logs is one option as suggested above, you might also want to include message trace information in order to cover for the last received/sent message from the mailbox, etc.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial