I see the doc mention on-prem exchange, but could we get email alerts generated from other products that are sent to O365 distrubution lists or shared mailboxes?
It does work... by default it is on and we just finished this setup on Splunk getting mail from Office 365. You can get your specific IMAP server by logging into Office 365 and going into your mail. Click on settings (the cog in the top right), then mail, accounts, POP and IMAP on the left. You'll see the IMAP server documented there.
There is an IMAP interface. For most clients it is at outlook.office365.com
I was unable to find an IMAP interface to Office365, but I did find a fairly comprehensive REST interface that enabled me to build my own Python script to read O365 mail. I can't share my code, but am willing to answer questions you may have about building your own interface. The REST docs are at https://msdn.microsoft.com/office/office365/api/mail-rest-operations.