The app ID com.fsck.k9 must be authorized in Azure by your admin before
How do I add an Office365 account?
will work. From this source:
configuring-exchange-account-with-imap-oauth2