How to enable OAuth for your Exchange server?

Modified on Fri, 16 Jun 2023 at 12:23 PM

If you're utilizing Exchange with modern authentication, follow these steps to add the application to your Azure AD:

Utilize the OAuth authentication service available in Azure Active Directory to grant access to your EWS Managed API applications for connecting to Exchange Online in Office 365.

Important: Make sure you have Microsoft Edge installed on the computer/server, because IE is no more supported by Microsoft to authenticate O365.

Step 1: To use OAuth with your application you will need to register your application with Azure Active Directory:

To use OAuth, an application must have an application ID issued by Azure Active Directory. In this tutorial, it is assumed that the application is Automatic Email Manager, so you need to register your application as a public client with Azure Active Directory. You can register an application in the Azure Active Directory admin center or by using Microsoft Graph.

1. Open a browser and navigate to the Azure Active Directory admin center and login using a personal account (aka: Microsoft Account) or Work or School Account.

2. Select Azure Active Directory in the left-hand navigation, then select App registrations under Manage.

3. Select New registration. On the Register an application page, set the values as follows.

- Set Name to a friendly name for your app (for example: AEM).

- Set Supported account types to the choice that makes sense for your scenario.

- For Redirect URI, change the dropdown to Public client (mobile & desktop) and set the value to 


4. Choose Register. On the next page, copy the values of the Application (client) ID and Directory (tenant) ID and save them, you will need them later in Automatic Email Manager.

Step 2: Add account in Automatic Email Manager

Add the account and choose the Exchange type in Automatic Email Manager, then fill the Exchange settings with data from your Azure AD (Tenant id, App id):

The server address should be:

When filled click on button 'Test connection', it should open your browser to sign in with a Microsoft account.

NOTE: We are not specialized with Exchange server settings, we suggest you contact your IT team or Microsoft support to help you add Automatic Email Manager in the list of authorized software.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article