Training Paths: Admin
< Back to Article List081. Configuring the Incoming Email Server to work with Microsoft 365
Last updated: 24 October 2025 at 08:06:32 UTC by Administrator
Setup in Microsoft Azure Portal
Create a new application
To get started, go to Microsoft’s Azure Portal. Log in with the Microsoft Outlook Office 365 account if there is one; otherwise, use a personal Microsoft account.
A user with administrative access to the Azure Settings must connect and perform the following configuration.
Next, navigate to the section labelled Manage Microsoft Entra ID (formally Azure Active Directory).
Now, click Add (+), located in the top menu, and select App registration.
On the Register an application screen, rename the Name field to Odoo (or something recognisable.)
Under the Supported account types section select:
Accounts in any organizational directory (Any Microsoft Entra ID directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
portal.azure.com
ALTERNATIVE Entra.microsoft.com
Under the Redirect URL section, select Web as the platform, and then input:
https://<web base url>/microsoft_outlook/confirm in the URL field. The web.base.url is subject to change depending on the URL used to log in to the database.
After the URL has been added to the field, click Register to create the application.
API permissions
Next, set up the required API permissions.
Odoo will need specific API permissions to be able to read (IMAP) and send (SMTP) emails in the Microsoft 365 setup.
First, click the API permissions link in the left menu bar
Next, click (+) Add a Permission and select Microsoft Graph under Commonly Used Microsoft APIs.
Choose Delegated Permissions.
In the search bar, add the following permissions:
SMTP.Send
IMAP.AccessAsUser.All
Assign users and groups
After adding the API permissions, navigate back to the Overview of the Application in the top of the left sidebar menu.
Under the Essentials overview table, click on the link labeled Managed Application in Local Directory (or the last option on the bottom right-hand side of the table.)
In the left sidebar menu, select Users and Groups, then click on (+) Add User/Group.
Depending on the account, either a Group and a User can be added, or only Users. Personal accounts will only allow for Users to be added.
Under Users or Groups, click on None Selected and add the users or group of users that will be sending emails from the Microsoft account in Odoo.
Add the users/groups, click Select, and then Assign them to the application.
Create credentials # FROM entra.microsoft.com not portal.azure.com
Now that the Microsoft Azure app is set up, credentials must be created for the Odoo setup - specifically the Client ID and Client Secret.
To start, the Client ID can be copied from the Overview page of the app. The Client ID or Application ID is located under the Display Name in the Essentials overview of the app.
Next, the Client Secret Value needs to be retrieved. To get this value, click on Certificates & Secrets in the left sidebar menu. Then, a Client Secret needs to be produced. In order to do this, click on the (+) New Client Secret button.
A window on the right will populate with a button labeled Add a client secret. Under Description, type in Odoo Fetchmail or something recognizable, and then set the expiration date.
Next, click on Add when these two values are entered. A Client Secret Value and Secret ID will be created. It is important to copy the Value or Client Secret Value into a notepad as it will become encrypted after leaving this page. The Secret ID is not needed.
After these steps, the following items should be ready to be set up in Odoo:
- A client ID (Client ID or Application ID)
- A client secret (Value or Client Secret Value)
This completes the setup on the Microsoft Azure Portal side.
Setup in Odoo
Enter Microsoft Outlook credentials
Go into JAMS Developer Mode
Users & Settings > Settings > General Settings > Activate the developer mode (at the bottom of the page).
Install the App
In the Odoo database, open the Apps module.
Remove the Apps filter from the search bar and search for Outlook.
After that, install the Microsoft Outlook module.
Next, go to Settings ‣ General Settings, and under the Discuss section, ensure that the checkbox for Custom Email Servers is checked. This populates a new option for Outlook Credentials.
Save the settings.
Then, paste your Client ID (Application ID) and Client Secret (Client Secret Value) into their respective fields and Save again.
Configure incoming email server
The incoming account should be configured in a similar way to the outgoing email account.
Go to the Incoming Mail Servers in the Technical Menu
Create a new configuration.
Check or Select the button next to Outlook Oauth Authentication and enter the Microsoft Outlook username.
Click Connect your Outlook account.
Odoo will state: Outlook Token Valid Now Test and Confirm the account.
The account should be ready to receive email to the Odoo database.
In case of getting this Error
AADSTS50194: Application
'216eb95c-2087-4'(Odoo IMAP) is not configured as a
multi-tenant application. Usage of the /common endpoint is not
supported for such applications created after '10/15/2018'. Use a
tenant-specific endpoint or configure the application to be
multi-tenant. Trace ID: 21f79f29-b3b2-45fa- Correlation
ID: 5e3a4821-8e83-8a7fcd0a84ff Timestamp: 2025-10-12
16:43:52Z
Come out of JAMS developer mode:
Users & Settings > Settings > General Settings > Deactivate the developer mode (at the bottom of the page).