Link to home
Start Free TrialLog in
Avatar of SAM2009
SAM2009Flag for Canada

asked on

How to export by Powerhsell: last activity date in the Office 365 usage reports use

Hi,

In O365 report  I can export:  last activity date in the Office 365 usage reports use

Is possible to do it by PowerShell script?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SAM2009

ASKER

So if someone needs to create a script with PowerShell there is no way for now. I would like to extract mailbox activity date for all users....
There are ways to get this data via PowerShell, it's simply not as easy as running a single cmdlet, like the ones we had before. At the very least, you will need to register an application and grant the corresponding permissions, as you will need to use that for getting an access token. After you've done that, it takes just few lines of code to request the report and download the CSV File, example here: https://docs.microsoft.com/en-us/graph/api/reportroot-getemailactivityuserdetail?view=graph-rest-1.0
Avatar of SAM2009

ASKER

Thank you!