Forum Discussion
StanleyHao
Jan 09, 2025Brass Contributor
M365 email license & access management
I am using powershell to read the lastlogontime so that powershell can revoke the license if lastlogontime > 60days, now I have several questions:
- is the lastlogontime the right parameter to judge this email is alive or not?
- why unlicensed email accounts can send/receive emails while lastlogontime >60days and license revoked?
- are there any best practices from you guys to judge active/inactive of email, remove license & block access?
1 Reply
- Depends where you are looking. The signInActivity > lastSuccessfulSignInDateTime gives you the last time the user logged in, but doesn't necessarily indicate email activity. You might want to combine this with the Exchange usage logs.
- There is no license requirement for sending messages.
Take a look at this script Tony has prepared for measuring user's activity: https://office365itpros.com/2022/08/08/microsoft-365-user-activity-2022/