Friday, March 26, 2021

Using Exchangelib to test EWS + oAUth2

Exchangelib is a Pyhton library where you can develop Python script that need to interact with Exchange. One of the use case for me is to develop a test script to troubleshoot connection to Office 365 using EWS + oAuth2 

The script below will need the following information and you will also need to register your application with Microsoft Azure.

Tenant ID, Client ID, Client Secret:  After your app is registered successfully, these information can be obtained from Azure.

Primary SMTP Address: Your email address that use for this integration

Exchange Web Service URL: This guide help you to identify your URL

The script will have debug mode enabled so you can see all the information when the script is run. It will print out total item in your inbox and also send out a test email.

Thursday, March 25, 2021

Make Outlook the Default Mail App

To do this, you have to go to Settings -> Apps ->Default apps and for the email, select "Outlook".


Please note that this is required even if you set the following in Outlook app. 

Make Outlook the default program for Email, Contacts, and Calender