If you rely on MAPI automation to connect third-party applications or custom scripts to Outlook, you have likely discovered that the new Outlook for Windows no longer supports this technology. MAPI (Messaging Application Programming Interface) allows external programs to send, receive, and manipulate email items programmatically. This article explains why MAPI support was removed, what specific features break, and how to replace MAPI automation using Microsoft Graph API, Power Automate, or Outlook COM add-ins.
Key Takeaways: Replacing MAPI Automation in New Outlook
- Microsoft Graph API: Replaces MAPI for sending mail, reading calendars, and managing contacts from external applications or scripts.
- Power Automate: Provides no-code flows to automate Outlook tasks such as saving attachments or sending scheduled emails.
- Outlook COM add-ins (classic Outlook only): Still work in classic Outlook but are blocked in new Outlook; migrate to web add-ins or Graph API.
Why New Outlook Removed MAPI Automation Support
New Outlook for Windows is built on the same web-based architecture as Outlook on the web. This design uses a lightweight rendering engine that does not load the full MAPI subsystem. MAPI requires a local MAPI profile, a MAPI session, and access to the Outlook object model. Because new Outlook runs as a Progressive Web App (PWA) with limited local system access, it cannot host MAPI sessions. Microsoft made this architectural decision to improve performance, reduce memory usage, and simplify updates. The trade-off is that any automation depending on MAPI — including VBA macros that use CreateObject("Outlook.Application"), third-party CRM integrations that connect via MAPI, and custom scripts that read or write to Exchange mailboxes — will fail in new Outlook.
What Breaks When MAPI Support Is Missing
The following operations stop working in new Outlook because they rely on MAPI:
- VBA macros that use the Outlook object model, such as
Application.SessionorNamespace.Logon. - COM add-ins that call MAPI functions directly (e.g., Redemption, OutlookSpy, or custom .dll add-ins).
- Scripts in Python, PowerShell, or C# that use
Microsoft.Office.Interop.Outlookto send emails or read calendar items. - Third-party tools that synchronize data with Outlook via MAPI, such as CRM connectors or backup utilities.
Steps to Replace MAPI Automation with Microsoft Graph API
The recommended replacement for MAPI automation is the Microsoft Graph API. Graph API is a RESTful web service that gives you programmatic access to Outlook mail, calendar, contacts, and tasks. It works with any application that can send HTTP requests, including Python, PowerShell, JavaScript, and Power Automate. Below are the steps to set up a basic Graph API integration to send an email from a script.
- Register an application in Azure AD
Go to the Azure portal (portal.azure.com) and navigate to Azure Active Directory > App registrations. Click New registration. Enter a name for your app (e.g., “Outlook Automation”) and select Accounts in any organizational directory and personal Microsoft accounts. Click Register. - Grant API permissions for Mail.Send
In the registered app, go to API permissions > Add a permission. Select Microsoft Graph > Application permissions. Search for and select Mail.Send. Click Add permissions. Then click Grant admin consent for your organization and confirm. - Create a client secret
Go to Certificates & secrets > Client secrets > New client secret. Add a description and an expiration period. Copy the secret value immediately — you will not see it again. - Write a script to send an email using Graph API
Use a language of your choice. Below is a Python example using the requests library:import requests
import jsontenant_id = "your-tenant-id"
client_id = "your-client-id"
client_secret = "your-client-secret"url = f"https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token"
data = {
"grant_type": "client_credentials",
"client_id": client_id,
"client_secret": client_secret,
"scope": "https://graph.microsoft.com/.default"
}
response = requests.post(url, data=data)
access_token = response.json()["access_token"]email_url = "https://graph.microsoft.com/v1.0/users/user@domain.com/sendMail"
email_body = {
"message": {
"subject": "Test from Graph API",
"body": { "contentType": "Text", "content": "This email was sent using Graph API." },
"toRecipients": [{ "emailAddress": { "address": "recipient@domain.com" } }]
}
}
headers = {"Authorization": f"Bearer {access_token}", "Content-Type": "application/json"}
requests.post(email_url, headers=headers, json=email_body) - Test the script
Run the script. Check the recipient inbox for the test email. If the script fails, verify that the user account has an Exchange Online license and that the Mail.Send permission is consented.
Using Power Automate as a No-Code Alternative
If you prefer not to write code, Power Automate offers hundreds of prebuilt connectors for Outlook and Microsoft 365. For example, you can create a flow that triggers when a new email arrives in Outlook and automatically saves its attachments to OneDrive. To create such a flow, sign in to make.powerautomate.com, click Create > Automated cloud flow, search for the trigger “When a new email arrives (V3)” from the Outlook connector, then add actions like “Create file” from OneDrive. Power Automate uses Graph API under the hood, so it works with both new Outlook and classic Outlook.
If MAPI Automation Is Still Required for Classic Outlook
If your organization cannot migrate away from MAPI automation immediately, you can keep using classic Outlook alongside new Outlook. Classic Outlook supports MAPI, VBA macros, and COM add-ins. To switch back to classic Outlook, open new Outlook, click the File menu, and choose Options > General. Under “New Outlook,” toggle the switch off. Outlook will restart in classic mode. Note that Microsoft will eventually end support for classic Outlook, so plan your migration to Graph API or Power Automate within the next 12 to 24 months.
Common Misconceptions About MAPI and New Outlook
“I can install a MAPI add-in to restore functionality”
No MAPI add-in can restore MAPI support in new Outlook because the underlying web architecture does not expose the MAPI subsystem. Add-ins in new Outlook must be web add-ins (JavaScript/HTML) or use the Graph API through the Outlook REST API. Any add-in claiming to enable MAPI in new Outlook is not compatible.
“VBA macros will work if I copy them to new Outlook”
VBA macros do not run in new Outlook. The VBA engine is part of the classic Outlook executable. New Outlook does not load the VBA runtime. To automate tasks, you must rewrite macros as Office Scripts (Excel/Web) or use Power Automate.
“Outlook on the web supports MAPI, so new Outlook should too”
Outlook on the web does not support MAPI. It uses REST APIs and EWS (Exchange Web Services) for client-server communication. New Outlook follows the same pattern. MAPI is a desktop-only protocol that requires a local Windows process, which new Outlook avoids for security and performance reasons.
MAPI Automation vs Graph API vs Power Automate: Key Differences
| Item | MAPI Automation | Microsoft Graph API | Power Automate |
|---|---|---|---|
| Works with new Outlook | No | Yes | Yes |
| Requires coding | Yes (VBA, C#, Python) | Yes (REST calls) | No (low-code / no-code) |
| Access to mail, calendar, contacts | Full | Full | Full |
| Authentication method | Windows credentials / MAPI profile | OAuth 2.0 | OAuth 2.0 (automatic) |
| Deployment scope | Local machine | Cloud / any platform | Cloud |
| Real-time event triggers | Yes (ItemAdd, ItemChange) | Yes (webhooks / change notifications) | Yes (triggers) |
Now you know why new Outlook does not support MAPI automation and how to replace it with Microsoft Graph API or Power Automate. Start by registering an Azure AD app and testing a simple email send script. If coding is not feasible, explore the prebuilt Outlook connectors in Power Automate. For advanced scenarios like real-time event monitoring, Graph API webhooks provide the same capabilities MAPI offered.