I was perfectly happy running my Fedora-based Linux workstation until a few weeks ago. Our company is using Office 365 (who does not nowadays?) and I was just content with using Evolution with EWS.
One sunny and hot afternoon, I received an email from the team informing them they are about to enable Multi-Factor Authentication for everything Microsoft. Even better – they decided to disable old school authentication method… to make our systems safer.
I thought to myself – that’s great… but … is my email agent (Evolution) going to fly with this new approach? Or am I (being OS minority) going to need to start using the web-based Outlook Web App (OWA).
So… my email agent stopped working. Hang on. I am taking this back. It worked just fine but did not authenticate (for the reasons stated above).
The following is the way to make your Evolution with EWS fly with MFA:
1. Call your support/Admin or whoever is responsible for the config of your Office 365/Azure and has admin privileges
2. Ask nicely for the following (if nicely does not cut it – do something about it):
- Azure Tenant ID
- Application ID created under the Application Registration of Azure Active Directory
3. Once you have all those details, you can just get into it
4. Given you still have your mailbox configured, go to Edit → Preferences. This will open Evolution Preferences:
5. Double Click (or Edit) your account. This will open another window: ‘Account Editor’. Click on Receiving Email in the right pane of the window:
6. Make Sure to select OAuth2 (Office 365) as the Authentication.
7. Select Override Office 365 OAuth2 settings and enter the Tenant ID and Application ID as provided by your Azure guru.
8. In the Redirect URI, provide the following URL:
https://login.microsoftonline.com/common/oauth2/nativeclient
9. Click OK and you are done (given the Application ID was created properly and the Tenant ID is correct).
10. The next time you will try to login you will see something like this:
If by any chance your evolution hung, do yourself a favour, open the terminal and do:
sudo pkill -9 evolution
If you think Linux requires the same treatment as Windows – reboot your workstation.
Enjoy your Evolution with OAuth2 and MF 🙂