How to Integrate Microsoft Outlook with Odoo Using OAuth Authentication
To get started, go to Microsoft’s Azure Portal. Log in with the Microsoft Outlook Office 365 account.
Search the App registration to click the menu.
3. Create a new registration for the Outlook integration process. Set the project name, select the supported account type, and update your redirect web URL.
4. Go to the Manage menu and click on API permissions to grant access.
5. In the search bar, search for the following Delegated permissions and click Add permissions for each one:
SMTP.Send
IMAP.AccessAsUser.All
6. Go to the Certificates & secrets menu and create a new client secret.
7. 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)
8. This completes the setup on the Microsoft Azure Portal side.
9. First, open the Odoo database and navigate to the Apps module. Then, remove the Apps filter from the search bar and type in Outlook. After that, install the module called Microsoft Outlook.
10. Next, navigate 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.
11. Save the progress.
12. Then, copy and paste the Client ID (Application ID) and Client Secret (Client Secret Value) into the respective fields and Save the settings.
Configure outgoing email server
13. On the General Settings page, under the Custom Email Servers setting, click the Outgoing Email Servers link to configure the Microsoft account.
14. Then, create a new email server and check the box for Outlook. Next, fill in the Name (it can be anything) and the Microsoft Outlook email Username.
15. If the From Filter field is empty, enter either a domain or email address.
16. Then, click on Connect your Outlook account.
17. If the From Filter field is empty, enter either a domain or email address.
18. A new window from Microsoft opens to complete the authorization process. Select the appropriate email address that is being configured in Odoo.
19.
Then, allow Odoo to access the Microsoft account by clicking on Yes. After this, the page will navigate back to the newly configured Outgoing Mail Server in Odoo. The configuration automatically loads the token in Odoo, and a tag stating Outlook Token Valid appears in green.