Export O365mailbox last login to csv

Occasional Contributor

Hello Everyone,


Currently trying to export my tenant mailbox last login details to CSV but somehow last login details are pulled wrongly by script which I was used.

Anyone can help me out how to pull mailbox last login to csv for 30 thousand mailboxes and it's a time consuming task.

I was going through this article explained about the same.


Can someone guide me how to export mailbox last login and never logged mailboxes from last 90 days to csv as I am not expert in scripting or write a PowerShell command.



Any help really appreciated.

Anand Sunka


1 Reply

The Graph API doesnt include any Exchange-related operations currently, so your best option is to use the Outlook activity report: https://docs.microsoft.com/en-us/graph/api/reportroot-getmailboxusagedetail?view=graph-rest-1.0