...
This article describes how to configure Microsoft 365 (M365) for Linux users (Ubuntu 21.04 or later), in accordance with 2-factor authentication.
Prior versions of Ubuntu are unable to configure Microsoft 365, and are restricted to using Thunderbird with email/IMAP.
...
For instructions on how to configure the Thunderbird mail client: How to setup Microsoft 365 in Thunderbird
The instructions in this guide allow Linux users (Ubuntu 21.04 or later) to configure Microsoft 365 (M365), in accordance with 2-factor authentication. The Microsoft 365 package includes apps such as PowerPoint, Excel, Word, Outlook and more.
For more information about the M365 package, please refer to this article: https://uwaterloo.ca/office-365/
...
Click on File > New Mail > Mail Account
Select Identity on the left hand side. Enter
Full Name: enter your full name (first and last)
Email Address: enter your 8 character UWaterloo username and @uwaterloo.ca (i.e. j25rober@uwaterloo.ca)
Unselect the “Look Look up mail server details based on entered email address” address option
Select the server type as Exchange Web Services
Note: If the Exchange Web Services option is not available, the add-on for this must be installed onto Evolution. On Ubuntu, this can be done through the Ubuntu Software StoreEnter your UWaterloo email address 8 character UWaterloo username and @uwaterloo.ca (i.e. j25rober@uwaterloo.ca)
a. Change the host URL to https://outlook.office365.com/
b. Change the authentication method to OAuth2 (Office365)
c. Click the Fetch URL buttonAuthenticate with DUO (2 factor authentication)
Two-factor authentication is known to be completed once the OAB URL is auto populated with an address. Select Next and modify default mail account configuration, if needed.
...