After looking into the problem, would using EWS instead of IMAP/SMTP not make much more sense, when checking Microsoft mail products?
Because with check_mailboxes, that’s how we did that. And then we could roll that change out to check_mail and check_mail_loop