SOLVED

need a script with last logon date or time for cloud users

Copper Contributor

Hi

 

i need to check when cloud users last logged on so i can do some housekeeping. These are cloud account so can not user exchange reports i have seen only for this

 

I have created this script but just need to get the out also of last logon time or date

 

get-msoluser -UserPrincipalName "Barnaby.Smither@centricaplc.onmicrosoft.com" | select FirstName, LastName, DisplayName, UserPrincipalName, UsageLocation, Department, Fax, WhenCreated -ExpandProperty Licenses |
Select FirstName, LastName, DisplayName, UserPrincipalName, UsageLocation, Department, AccountSkuID, Fax, WhenCreated

1 Reply
best response confirmed by pardeep soba (Copper Contributor)
Solution

Look at the Activity report under O365 Admin center -> Reports -> Usage (or here https://portal.office.com/adminportal/home#/reportsUsage/LicenseActivity). It will give you the last activity date per service.

 

Other than that, you can look at the Audit logs. There is no parameter you can get with Get-MsolUser or similar.

1 best response

Accepted Solutions
best response confirmed by pardeep soba (Copper Contributor)
Solution

Look at the Activity report under O365 Admin center -> Reports -> Usage (or here https://portal.office.com/adminportal/home#/reportsUsage/LicenseActivity). It will give you the last activity date per service.

 

Other than that, you can look at the Audit logs. There is no parameter you can get with Get-MsolUser or similar.

View solution in original post