Microsoft 365 Connector — Outlook, Teams, OneDrive & Dynamics CRM
by Steven Marp https://apps.odoo.com/apps/browse?repo_maintainer_id=512936$ 1040.20
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
CRM (crm)
• Calendar (calendar) • Contacts (contacts) • Discuss (mail) • Project (project) |
| Lines of code | 2499 |
| Technical Name |
sm_365_connector |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/browse?repo_maintainer_id=512936 |
| Versions | 16.0 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
CRM (crm)
• Calendar (calendar) • Contacts (contacts) • Discuss (mail) • Project (project) |
| Lines of code | 2499 |
| Technical Name |
sm_365_connector |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/browse?repo_maintainer_id=512936 |
| Versions | 16.0 17.0 18.0 19.0 |
Microsoft 365 Connector — Outlook & Dynamics CRM
All-in-one Microsoft 365 integration: sync Outlook contacts, calendar & emails, create Teams meetings, sync To Do tasks, store files on OneDrive & import Dynamics 365 CRM data. Direct API, no middleware.
Module Video Overview
Features
1 2-Way Contact SyncBi-directional sync between Outlook Contacts and Odoo partners. New contacts created on either side are automatically synced. Existing contacts are matched, updated, and deduplicated based on email address. |
Outlook â Odoo Contact Sync |
|
Calendar Sync + Teams Meeting |
2 Calendar Sync & Teams MeetingsBi-directional event sync between Outlook Calendar and Odoo. Create Microsoft Teams meetings directly from any calendar event with one click — join URL is auto-inserted. |
3 Email Import & Send via OutlookImport emails from your Outlook inbox including HTML body, attachments, and inline images. Send emails from Odoo using the Microsoft Graph API â no SMTP needed. Full Outlook unified inbox view inside Odoo. |
Outlook Email Import & Send |
|
Email Rules â Auto-Create Records |
4 Email Auto-Conversion RulesDefine rules that match incoming emails by subject, sender, or regex patterns and automatically create CRM leads, opportunities, project tasks, or internal notes. Sequential rule matching with configurable priorities. |
5 Microsoft To Do Task SyncBi-directional sync between Microsoft To Do and Odoo Project tasks. Tasks created in To Do appear in Odoo, and vice versa. Due dates, status, and descriptions stay in sync. |
Microsoft To Do â Odoo Tasks |
|
OneDrive Attachment Storage |
6 OneDrive Attachment StorageOffload Odoo attachments to OneDrive. Files are uploaded to a configurable folder with direct download & web view links. Reduce Odoo database size while keeping documents accessible. |
7 Dynamics 365 CRM ImportImport Leads, Opportunities, Accounts & Contacts from Dynamics 365 CRM into Odoo. OAuth2 Client Credentials flow connects to any Dynamics 365 environment. Deduplication on re-import keeps data clean. |
Dynamics 365 â Odoo CRM |
|
Real-Time Change Notifications |
8 Real-Time WebhooksEnable Microsoft Graph change notifications for instant sync. When a contact, event, or email changes in Outlook, Odoo is notified immediately — no polling, no delays. Subscriptions auto-renew via cron. |
9 Outlook Web Add-inBuilt-in Outlook Add-in that lets you create Odoo records (contacts, leads, tasks) directly from inside Outlook. Sideload the manifest and access Odoo without leaving your email client. |
Outlook Add-in for Quick Record Creation |
And much more...
OAuth2 AuthenticationAuthorization Code flow for Outlook, Client Credentials for Dynamics 365. Automatic token refresh — no manual token management. |
Role-Based Access365 User (sync & view) and 365 Manager (full access to connections, settings, and configuration). Multi-company support. |
Auto-Sync SchedulerScheduled cron jobs auto-sync contacts, calendar, emails, and tasks at configurable intervals. Manual sync always available. |
Full Sync LoggingEvery sync operation is logged with status, record counts, and error details. Filter logs by type, status, or date for easy debugging. |
Kanban DashboardOverview dashboard showing all connections with sync counts, error badges, and quick-action buttons. See everything at a glance. |
Retry Failed SyncsFailed sync operations can be retried with one click. Error details guide you through resolution — no data loss. |
Support
We provide free bug fixes and updates for all our modules. If you need help, please submit a support request through the Odoo Apps support page. Our team is always ready to assist you.
Microsoft 365 Connector — User Guide
Table of Contents
- 1. Overview
- 2. What You Need Before Starting
- 3. Setting Up Azure (Step by Step)
- 4. Connecting Odoo to Microsoft 365
- 5. Setting Up Dynamics 365 CRM (Optional)
- 6. Using the Module
- 7. Real-Time Sync (Webhooks)
- 8. Outlook Add-in
- 9. Automatic Sync Schedule
- 10. Single Sign-On (SSO)
- 11. Troubleshooting
- 12. Security
1. Overview
The Microsoft 365 Connector brings your entire Microsoft 365 ecosystem into Odoo: Outlook emails, contacts, calendar, Teams meetings, To Do tasks, OneDrive files, and Dynamics 365 CRM — all from a single module.
Everything syncs automatically. No middleware, no monthly subscription fees. Install once, connect, and work from Odoo without switching between apps.
2. What You Need Before Starting
Before you begin, make sure you have:
- A Microsoft 365 account (personal Outlook works for testing, but Microsoft 365 Business is recommended for production)
- Access to Azure Portal (portal.azure.com) — this is where you register your app
- Your Odoo server accessible via HTTPS (required by Microsoft for security)
- For Dynamics 365 CRM features: a Dynamics 365 license on your tenant
Tip
Don't have HTTPS yet? For local testing, use a tunneling service like ngrok to temporarily expose your Odoo over HTTPS.
3. Setting Up Azure (Step by Step)
This is a one-time setup. Takes about 10 minutes.
Step 1 — Register Your App
- Go to portal.azure.com and sign in.
- Search for "App registrations" in the top search bar.
- Click New registration.
- Fill in:
- Name: anything you like, e.g. "Odoo Microsoft 365"
- Supported account types: choose "All Microsoft account users" (recommended)
- Redirect URI: select Web and enter: https://your-odoo-domain.com/microsoft365/callback
- Click Register. Done!
Important
The Redirect URI must exactly match your Odoo domain with HTTPS. If your Odoo is at https://erp.mycompany.com, the URI would be https://erp.mycompany.com/microsoft365/callback.
Step 2 — Grant Permissions
Your app needs permission to access Outlook, Calendar, etc.
- In your newly created app, click API permissions in the left menu.
- Click Add a permission → Microsoft Graph → Delegated permissions.
- Search and add these permissions:
- User.Read
- Contacts.ReadWrite
- Calendars.ReadWrite
- Mail.ReadWrite
- Mail.Send
- Tasks.ReadWrite
- Files.ReadWrite
- OnlineMeetings.ReadWrite
- offline_access
- Click Grant admin consent (the green checkmark button at the top).
Step 3 — Create a Secret Key
- In the left menu, click Certificates & secrets.
- Click New client secret.
- Give it a name (e.g. "Odoo") and choose an expiry (24 months recommended).
- Click Add.
- Copy the Value immediately — you won't be able to see it again!
Step 4 — Copy Your App Credentials
Go back to the Overview page of your app. You need three values:
| What to copy | Where to find it |
|---|---|
| Application (Client) ID | Overview page, first line | |
| Directory (Tenant) ID | Overview page, second line |
| Client Secret | The value you copied in Step 3 |
Warning
Keep your Client Secret safe! Don't share it publicly or commit it to version control.
4. Connecting Odoo to Microsoft 365
Now switch to Odoo.
Step 1 — Create a Connection
- Open the Microsoft 365 menu (appears after installing the module).
- Click Connections → Create.
- Fill in the three credentials from Azure:
- Tenant ID (or type common if you chose multi-tenant in Azure)
- Application (Client) ID
- Client Secret
- Give it a name, e.g. "My Company 365".
Step 2 — Authorize Outlook
- Click the Authorize Outlook button.
- You'll be redirected to Microsoft's login page.
- Sign in with your Microsoft account.
- Accept the permission request.
- Microsoft redirects you back to Odoo — the status changes to Outlook Connected.
Step 3 — Verify It Works
- Click Test Connection.
- You should see a success message with your Microsoft account name and email.
- You're connected!
That's it for basic setup. All Outlook features (contacts, calendar, email) are now ready to use.
5. Setting Up Dynamics 365 CRM (Optional)
Skip this if you don't use Dynamics 365 CRM.
Note
Dynamics 365 requires its own license, separate from regular Microsoft 365. The same Azure app can be used for both Outlook and Dynamics.
- In Azure Portal → your App Registration → API Permissions.
- Click Add a permission → Dynamics CRM → Application permissions.
- Add user_impersonation and grant admin consent.
- In Odoo, open your connection and enable Enable Dynamics 365 CRM.
- Enter your Organization Name — this is the subdomain from your Dynamics URL:
- https://contoso.crm.dynamics.com → Organization Name is contoso
- https://mycompany.crm4.dynamics.com → Organization Name is mycompany
- Select the correct Region for your Dynamics environment.
- Click Connect Dynamics.
Warning
The Organization Name is not your company display name. It's the short identifier in your Dynamics URL. Using a display name with spaces will fail.
6. Using the Module
Contact Sync
- Click Sync Contacts to sync Outlook ↔ Odoo contacts in both directions.
- Contacts are matched by email address to prevent duplicates.
- New contacts on either side are automatically created on the other.
Calendar Sync
- Click Sync Calendar to sync events between Outlook and Odoo.
- Changes on either side are reflected on the other after sync.
Teams Meetings
- Open any calendar event in Odoo.
- Click Create Teams Meeting — the join link is added automatically.
- Attendees can click the link to join the meeting.
- Requires a Microsoft Teams license on the connected account.
Importing emails:
- Click Import Emails to pull recent emails from your Outlook inbox into Odoo.
- Emails include the full HTML body, attachments, and images.
- View them in Microsoft 365 → Outlook Inbox.
Sending emails:
- On any contact, click Send via Outlook.
- Write your message and click Send — delivered via your Outlook account.
- No SMTP setup needed.
Auto-conversion rules:
- Define rules in the Email Rules tab on your connection.
- Incoming emails matching your rules automatically create leads, opportunities, tasks, or internal notes.
To Do Tasks
- Click Sync To Do Tasks to sync between Microsoft To Do and Odoo Project.
- Tasks sync in both directions: titles, descriptions, due dates, and status.
OneDrive
- Enable Use OneDrive for Attachments in your connection settings.
- Click Upload to OneDrive on any record to offload attachments.
- Files get direct download and view links stored in Odoo.
Dynamics 365 CRM
Use the import buttons on your connection:
- Import Leads — brings active leads into Odoo CRM
- Import Opportunities — brings open opportunities
- Import Accounts — imports companies as Odoo contacts
- Import Contacts — imports people as Odoo contacts
Re-importing updates existing records instead of creating duplicates.
7. Real-Time Sync (Webhooks)
Instead of manual or scheduled sync, you can enable instant sync:
- Enable Real-Time Webhooks in your connection settings.
- Click Enable Webhooks.
- Now whenever a contact, event, or email changes in Outlook, Odoo is notified and syncs immediately.
Subscriptions are automatically renewed — no maintenance needed.
Important
Webhooks require your Odoo server to be accessible from the internet via HTTPS. Self-signed certificates won't work.
8. Outlook Add-in
Work with Odoo without leaving Outlook:
- Download the add-in manifest from your connection form.
- In Outlook → Settings → Get Add-ins → My Add-ins → upload the manifest.
- When reading an email, open the add-in panel.
- Create contacts, leads, or tasks in Odoo directly from the email.
9. Automatic Sync Schedule
The module includes scheduled jobs that run automatically:
- Auto-Sync — syncs contacts, calendar, emails, and tasks periodically (default: every 60 minutes). Enable Scheduled Auto-Sync in connection settings.
- Webhook Renewal — renews real-time sync subscriptions before they expire (runs every 6 hours automatically).
10. Single Sign-On (SSO)
When you connect Outlook, the module automatically enables "Sign in with Microsoft 365" on your Odoo login page. Your team can log into Odoo using their Microsoft credentials without a separate password.
SSO is automatically disabled when all Microsoft 365 connections are disconnected.
11. Troubleshooting
"redirect_uri is not valid" error when authorizing
→ The Redirect URI in Azure doesn't match your Odoo URL. Make sure you added https://your-domain.com/microsoft365/callback in Azure → Authentication. Must be HTTPS, must match exactly.
OAuth login shows "AADSTS" error
→ Double-check the Tenant ID in Odoo. Try common for multi-tenant support.
Token refresh fails / "re-authorize" message
→ Your Client Secret may have expired. Create a new one in Azure and update it in the Odoo connection form.
Dynamics connection fails
→ Make sure the Organization Name is the URL subdomain (e.g. contoso), not your company display name. Check that the Region matches your environment.
Webhooks not working
→ Your Odoo server must be publicly accessible via HTTPS. Self-signed certificates are rejected by Microsoft.
Contact sync creates duplicates
→ Contacts are matched by email address. Make sure both sides have the same email for proper deduplication.
Teams meeting creation fails
→ The connected Microsoft account needs a Teams license.
Emails rejected / go to spam
→ Free Outlook accounts (@outlook.com) have low sender reputation. For production use, we recommend Microsoft 365 Business with a custom domain.
Email images broken after import
→ Click Re-fetch Email Images on the connection to re-download inline images.
12. Security
- All communication with Microsoft uses OAuth 2.0 — no passwords are stored.
- Tokens are encrypted and only accessible to system administrators.
- Tokens refresh automatically — no manual maintenance.
- Webhook notifications are validated for authenticity.
- Two security groups: 365 User (basic access) and 365 Manager (full admin).
- All data transfer happens over encrypted HTTPS connections.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module