To enable Oauth, an app will have to be registered in Azure Active Directory.


First, login to Azure Active Directory and go to App Registration.


Click New Registration and then fill out the form and click Register.

The app is registered. Next, go to API permissions, click Microsoft Graph and then choose Delegated Permissions.


Add EWS.AccessAsUser.All.


Next, add a client secret. Go to Certificates & Secrets and click New client secret.


Choose a description for the secret and an expiration.


Copy the Value and Secret ID to a safe location. You cannot retrieve it later.