Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"Can't connect to Exchange" message appears when using Dynamics 365 App for Outlook


View products that this article applies to.

Symptom

When using Dynamics 365 App for Outlook, you see the following message:

"Can't connect to Exchange".

The rest of the app may load successfully but the ability to track items and use Set Regarding may be missing.

↑ Back to the top


Cause

This typically occurs when using a Microsoft Exchange on-premises mailbox and may be caused by one of the following reasons:

Cause 1: OAuth authentication is not enabled in Exchange

Cause 2: There is an issue with the authentication certificate used by Exchange.

↑ Back to the top


Resolution

Resolution 1: Verify OAuth authentication is enabled in Exchange

  1. On the Exchange server, open the Exchange Management Shell.
  2. Run the following command:

    Get-WebServicesVirtualDirectory | FL server,*auth*
  3. Verify the results returned show that OAuthAthentication is set to True.
  4. If OAuthAthentication is set to False, a command such as the following needs to be run:

    Set-WebServicesVirtualDirectory -Identity "EWS (Default Web Site)" -OAuthAuthenticat
    ion $true

     
  5. Run the following command:

    Get-OrganizationConfig | FL OAuth2ClientProfileEnabled

    If the value returned is False, run the following command:

    Set-OrganizationConfig -OAuth2ClientProfileEnabled:$True

  6. Also verify your version of Exchange has the update mentioned in the following article:

    Can't access EWS from Outlook/OWA add-ins via makeEwsRequestAsync in Exchange Server 2016 and Exchange Server 2013
    https://support.microsoft.com/help/4056329 

Resolution 2: Verify Exchange Certificate

  1. On the Exchange server, open the Exchange Management Shell.
  2. Run the following command:

    Get-AuthConfig | FL
  3. Verify the results show IsValid as True
  4. Copy the value returned for CurrentCertificateThumbprint and use it in the following command:

    Get-ExchangeCertificate -Thumbprint <CurrentCertificateThumbprint Value> | FL
  5. Verify the results show the following:

    Status = Valid

    The current date is within the NotAfter and NotBefore dates indicating the certificate is not expired.

    If the prior command does not successfully retrieve the certificate, this indicates an issue with the certificate configuration which may require you to create and configure a new certificate. The following are some resources with steps for creating and configuring a new certificate:
     

    https://support.microsoft.com/help/3089171

    https://docs.microsoft.com/Exchange/architecture/client-access/create-self-signed-certificates?view=exchserver-2019

    https://docs.microsoft.com/powershell/module/exchange/organization/set-authconfig?view=exchange-ps

If any changes were required after following the steps above, close and reopen Outlook to see if the issue has been resolved. If the issue persists and your Microsoft Exchange administrator has verified OAuth is enabled and the certificate is valid, it may be necessary to contact Microsoft Support.

↑ Back to the top


Keywords: track, app, Outlook, Exchange, connect, Can't connect to Exchange

↑ Back to the top

Article Info
Article ID : 4534356
Revision : 7
Created on : 12/12/2019
Published on : 12/12/2019
Exists online : False
Views : 275