04 August 2018

Exchange: How to reliably determine that a user is logged into mailbox?

Sometimes (for example while migration users are from another email system) there is a need for reliable determination that a user is logged into the mailbox (using Outlook or OWA).

The simplest answer is mailbox's lastlogontime (Get-MailboxStatistics). But it turnes out to be not quite true.
Attention! The attribute "LastLogonTime" of user's mailbox filled and updated when another user opens user's calendar.

Finally, I found 4 criterias which help to reliably determine that a user is logged into the mailbox.

  1. "lastlogontime" (Get-MailboxStatistics) - necessary but not sufficient attribute.
  2. "Languages" (Get-Mailbox) - this attribute filled when user entered into OWA and sometimes filled when entered into Outlook.
  3. "WorkingHoursTimeZone" (Get-MailboxCalendarConfiguration) - this attribute filled when user entered into OWA and sometimes filled when entered into Outlook. Deffault value - "Pacific Standard Time", so you can use it only if users are in a different time zone.
  4. "Quick Step Settings" (Get-MailboxFolderStatistics) - this is not an attribute, it is a checking for the presence of a folder "Quick Step Settings" in the mailbox, because it appears only when you open/configure Outlook.