How to keep EWS API enabled for In-Place (Online) Archive backup¶
Microsoft is retiring Exchange Web Services (EWS) in Exchange Online in favor of Microsoft Graph, which better meets its current security, scalability, and reliability requirements. The retirement will start on Oct 1, 2026 and can be postponed until Apr 1, 2027 by explicitly allowing EWS for your Microsoft 365 tenant and making sure that the Afi application ID is included in the EWS allow list.
At the moment, Afi already uses Graph API for all supported Exchange-related workloads except for In-place (Online) Archive backup because Microsoft has not yet made a Graph API for archive mailboxes generally available. To keep protecting In-place (Online) Archive data after Oct 1, 2026, follow instructions in this section.
Info
Afi is monitoring Microsoft 365 roadmap and will implement a Graph-based version of In-place (Online) Archive backup as soon as the corresponding APIs become available on the Microsoft 365 side.
Afi EWS migration status for Exchange-related workloads¶
Afi has been designed to rely mainly on modern Graph API for Exchange-related workloads from the very beginning, with EWS API being used where the Graph alternative wasn't available at the time. After Microsoft 365 announced the upcoming EWS API deprecation, Afi has begun migrating workloads that previously relied on EWS API to Graph and by now has finished migration for all workloads except for In-place (Online) Archive.
At the moment, Afi uses Graph API to back up mail, contacts, calendars, and tasks (To-Do tasks) for primary user, shared, and room/equipment mailboxes, as well as mail for group mailboxes. When enabled in backup SLA policy settings, Recoverable Items folders are also backed up for user, shared, and room/equipment mailboxes.
Unlike certain vendors which still rely on EWS API fallback in case of API throttling or certain errors from Graph API, Afi backs up primary mailboxes entirely with Graph API and is able to handle encountered Graph API errors gracefully.
Keep EWS API enabled for Afi¶
The instructions below explain how to keep backing up In-Place (Online) Archive data after Oct 1, 2026 and until the full EWS shutdown on Apr 1, 2027.
Connect to Exchange Online PowerShell with an Exchange administrator account and run the script below. It enables EWS and adds Afi's application ID to EWSAllowedAppIDs, keeping any existing entries:
# Connect to Exchange Online.
Connect-ExchangeOnline -ErrorAction Stop
# Afi's application (client) ID.
$afiAppId = "d46ecdff-bc8c-4d98-a863-7b496bbb4321"
# Read the current list so existing entries are preserved.
$ewsConfig = Get-OrganizationConfig `
-RetrieveEwsOperationAccessPolicy `
-ErrorAction Stop
# Add Afi only if it is not already listed.
$allowedAppIds = $ewsConfig.EwsAllowedAppIDs
if (($allowedAppIds -split ",") -notcontains $afiAppId) {
$allowedAppIds = "$allowedAppIds,$afiAppId".Trim(",")
}
# Save the updated list and enable EWS.
Set-OrganizationConfig `
-EwsAllowedAppIDs $allowedAppIds `
-EwsEnabled $true
Info
Microsoft will begin enforcing the application ID allow list on Oct 1, 2026, with the change reaching tenants at different times. If EWSEnabled = True and no list has been configured, Microsoft will create one using the previous 60 days of EWS activity.
EWS is scheduled to shut down completely on Apr 1, 2027. These settings will not keep it available after that date.