Knowledge Base

How to check and enable EWS per Microsoft 365 tenant or user

Problem:

You need to check if Exchange Web Services (EWS) is enabled for your Microsoft 365 tenant or specific users to troubleshoot problems with your CodeTwo software.

Solution:

Some CodeTwo products rely on EWS to perform the following tasks:

  • CodeTwo Email Signatures On-prem: update emails in the Sent Items folder with signatures. 
  • CodeTwo Office 365 Migration & CodeTwo Exchange Migration: connect to Microsoft 365 and perform migration jobs.
  • CodeTwo Backup: connect to Microsoft 365 and perform backup and restore jobs.

Access to EWS must be enabled in your Microsoft 365 tenant for these features to work. Note that EWS can be blocked, for instance, as part of Baseline Security Mode (BSM) in the Microsoft 365 admin center (by enabling the Block access to ‎Exchange Web Services setting).

How to enable access to EWS

The only method to view and change the current access configuration for EWS is by using PowerShell. Here’s how to do this:

  1. Open Windows PowerShell and connect to your Exchange Online organization by following these steps
  2. Use the following cmdlet to check if EWS is enabled organization-wide:
    Get-OrganizationConfig | select EWSEnabled
    If the result is False or you don’t get any value (Null), as shown in Fig. 1., go to the next step to enable EWS. 

    Important

    The Null value is treated as True until September 2026. Starting October 1, 2026, the Null value for this setting will automatically change to False.

    The cmdlet result showing no (Null) value.
    Fig. 1. The cmdlet result showing no (Null) value.

  3. To allow EWS for the entire organization, use the following cmdlet:
    Set-OrganizationConfig -EwsEnabled:$true
  4. When you check the EWS status again, as in step 2, you should get the result shown in Fig. 2.

Confirmation that EWS is enabled in your Microsoft 365 organization.
Fig. 2. Confirmation that EWS is enabled in your Microsoft 365 organization.

 

You can also check and enable EWS for a single user. However, the org-wide setting (Set-OrganizationConfig) will disable any per-user EWS overrides.

Troubleshooting

If you get the following error:

The term 'Set-OrganizationConfig' is not recognized as a name of a cmdlet, function, script file, or executable program.

you need to install and import the Exchange Online PowerShell V3 module using the following cmdlets:

Install-Module -Name ExchangeOnlineManagement;
Import-Module -Name ExchangeOnlineManagement

If you have other problems executing these cmdlets in PowerShell, see the troubleshooting section in this article.

Was this information useful?
Our Customers: