Sunsetpatch

Exchange Online EWS · April 1, 2027

exchangelib and EWS Managed API stop working April 1, 2027

If your code reaches Exchange Online through exchangelib (Python) or the EWS Managed API (the .NET Microsoft.Exchange.WebServices package), it is an EWS client. Microsoft says EWS in Exchange Online is permanently disabled on April 1, 2027 (Exchange team blog), so these libraries stop working against Microsoft 365 mailboxes on that date. On-premises Exchange Server is not affected.

What changes

TodayAfter
Python exchangelib with Account, Credentials or OAuth2 to EWSMicrosoft Graph with the msgraph-sdk and msal packages, or plain HTTPS calls to graph.microsoft.com
.NET ExchangeService from Microsoft.Exchange.WebServicesGraphServiceClient from the Microsoft.Graph NuGet package
Basic or impersonation access to many mailboxesAn Entra ID app registration with Graph application permissions, limited to the mailboxes it needs
FindItems, account.inbox.all()GET /users/{id}/mailFolders/inbox/messages with $filter and $top
Message(...).send()POST /users/{id}/sendMail
CalendarItem create and queryPOST /users/{id}/events, GET /users/{id}/calendarView

The full operation-by-operation mapping is Microsoft's own (aka.ms/ews2graphMap). Not every EWS feature has a Graph equivalent: the mapping lists known gaps, including generic public-folder and Microsoft 365 group mailbox operations that it says won't be added, so check any code that touches them first.

What does not port line by line

Do now

  1. Find every caller: the grep patterns or the free check list the files.
  2. Ask your admin whether EWS is already disabled in your tenant (disabling by default began in October 2026).
  3. Rebuild one flow end to end on Graph, then the rest.

EWS code to move?

Send the free check's output and we quote a fixed price, from $890, before any work starts.

Run the free check See fixed prices