ENS: Unable to Open Exchange Connection to Office 365

Error/Symptom

This error is observed in the ENS logs when using either a Saas or an On Premise instance of AirWatch.

The detailed error is as below

AW.Mail.Notification.Service.BusinessImpl.ExchangeSubscriber Unable to open Exchange Connection Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

 

Cause

It could be because of the following:

  1. The ENS server cannot communicate with the exchange/office 365 EWS endpoint because of a network or SSL Issue.
  2. The office 365/Exchange EWS endpoint is not configured to accept connections.

 

Resolution

To resolve the above error perform the following.

1. Check if port 443 is open from the ENS Server to the Exchange Server.

2.  Check and resolve the SSL error from the ENS Server to the Exchange Server.

3. If the end point is office 365. Run the queries below to allow all client apps access to REST/EWS.

Set-OrganizationConfig -EwsApplicationAccessPolicy EnforceBlockList -EwsBlockList $null

This sets the EWS access policy.

Get-OrganizationConfig | Format-List EwsApplicationAccessPolicy,Ews*List

This checks the access policy.

If the set command was not run you should receive the output below.

EwsApplicationAccess: 

EwsAllowList:

EwsBlockList:

If the Set command was run successfully, you should receive the output below.

EwsApplicationAccess: EnforceBlockList

EwsAllowList:

EwsBlockList: {}

 

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.