+1 (866) 930-8356
Real Microsoft expertise. Real business value.

Office 365 / List Exchange Users Last Access Time

When it comes to Office 365 you need to ensure that users are actually using their accounts because you may be paying for licenses that are not being used.  I recently have worked with a client that is very budget conscious and doesn’t want to purchase additional Office 365 licenses if we have users assigned licenses that are not using them.  Office 365 give you the same ability as on-premise Exchange to query if mailboxes are being logged into.  Here are the steps below to run a query against your Office 365 tenant to verify mailboxes are being logged into:

1. Install the Microsoft Online Services Module

(x86) – http://go.microsoft.com/fwlink/p/?linkid=236345

(x64) – http://go.microsoft.com/fwlink/p/?linkid=236293

2. Open Microsoft Online Services Module for Windows PowerShell

3. $Cred = Get-Credential (Type in your Microsoft Online Services Credentials, someone@domain.onmicrosoft.com)

4. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection

5. Import-PSSession $Session

6. Get-Mailbox | Get-MailboxStatistics | Sort DisplayName | FT -AutoSize DisplayName, LastLogonTime > “path to output”

7. Open file outputted in step 6 in Excel


I work on Microsoft based UC projects utilizing Lync Server and Exchange Server. Design, migrations and interoperability with TDM-PBX and IP-PBX platforms like Cisco Unified Call Manager (CUCM), Nortel Option 11C, Avaya S8500, ShoreTel, Inter-Tel, NEC and Tadiran. Integration typical includes a media gateway from AudioCodes, Dialogic, Ferrari Electronics or Sonus/NET.

  • Pingback: Offic365 Reporting

  • Alexander Lopez Pulido


    thanks for the information was really useful. I needed to give a report about last access to user mailbox, for the same razon that you explained licensing of office365.

    I just adding one parameter, for large results in the search.

    thanks a lot.

    Get-Mailbox -ResultSize Unlimited| Get-MailboxStatistics | Sort DisplayName | FT -AutoSize DisplayName, LastLogonTime > “path to output”