Forum Discussion

StanleyHao's avatar
StanleyHao
Brass Contributor
Jan 09, 2025

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:

  1. is the lastlogontime the right parameter to judge this email is alive or not?
  2. why unlicensed email accounts can send/receive emails while lastlogontime >60days and license revoked?
  3. are there any best practices from you guys to judge active/inactive of email, remove license & block access?

1 Reply

    1. 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.
    2. 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/