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.
- "lastlogontime" (Get-MailboxStatistics) - necessary but not sufficient attribute.
- "Languages" (Get-Mailbox) - this attribute filled when user entered into OWA and sometimes filled when entered into Outlook.
- "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.
- "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.