Find Inactive Users in Office 365
Office 365 now includes some rudimentary reports, including one that tells you how many Inactive mailboxes you have in your tenant.
A mailbox is considered inactive by Microsoft if a user has not logged in for more than 30 days.
As you can see in the chart above, there are 23 mailboxes in my tenant that have not been logged into in the past 30-60 days. That’s great Microsoft, but which 23 people!?
Obviously, our Office 365 reporting software can show you this information in much more detail at the click of a button, but we’ll also show you a couple more ways to find this information out on your own.
If you’re using the new version of Office 365 you can use the Get-StaleMailboxDetailReport which will list out the users who have not logged in for at least 30 days.
To run this cmdlet, first connect to Office 365 using PowerShell as an administrator by copying and pasting these cmdlets into PowerShell.
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://ps.outlook.com/powershell/" -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $session -AllowClobber
Then run the Get-StaleMailboxDetailReport cmdlet to show you a list of users who have not logged in. This information is also available from the Microsoft Office 365 Reporting web service.
Getting all users Last Logon Times
We have developed a PowerShell script that will connect to Office 365 and export a list of all your users last logon times to a CSV file. This allows you to manage the data in Microsoft Excel to get a more detailed overview of who is using Office 365.
Click below to get more information about our script:
Office 365 last logon date PowerShell script
These other blog posts may be of interest to you:
- Export a list of Mailbox Sizes in Office 365
- Export a list of all Distribution Groups and their members
- Office 365 Administrator Account Best Practises – Ensure your Office 365 account is secured