Skip to content

Commit a176f79

Browse files
authored
Merge pull request #7800 from MicrosoftDocs/lucciz01-improve--test-connection-fails-email-server.md
AB#2875: Reorganize/move/improve articles - test-connection-fails-email-server
2 parents 37918d5 + be8cc14 commit a176f79

1 file changed

Lines changed: 26 additions & 24 deletions

File tree

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
11
---
2-
title: Test Connection fails from Email Server
3-
description: Provides a solution to an issue where Test Connection fails from Email Server Profile in Microsoft Dynamics 365.
2+
title: Test Connection fails in email server profile
3+
description: Provides a solution to an issue where test connection fails from an email server profile in Microsoft Dynamics 365.
44
ms.reviewer:
5-
ms.topic: troubleshooting
6-
ms.date: 11/19/2024
5+
ms.date: 12/11/2024
76
ms.custom: sap:Email and Exchange Synchronization
87
---
9-
# Test Connection fails from Email Server Profile in Microsoft Dynamics 365
8+
# Test Connection fails with 401 or time-out error in email server profile in Microsoft Dynamics 365
109

11-
This article provides a solution to an issue where Test Connection fails from Email Server Profile in Microsoft Dynamics 365.
10+
This article provides a solution to an issue where **Test Connection** fails from an email server profile in Microsoft Dynamics 365.
1211

1312
_Applies to:_   Microsoft Dynamics 365
1413
_Original KB number:_   4493267
1514

1615
## Symptoms
1716

18-
When using the Test Connection option from an Email Server Profile in Dynamics 365, the test fails and you may see an error like the following example:
17+
When you [test connection on an email server profile record](/power-platform/admin/connect-exchange-server-on-premises#create-an-email-server-profile) in Dynamics 365, the test fails and you might see one of the following errors:
1918

20-
> "Remote server error: (401) Unauthorized. Make sure the user name and password you entered are correct and try again."
21-
or
19+
> Remote server error: (401) Unauthorized. Make sure the user name and password you entered are correct and try again.
2220
23-
> "System.Net.WebException: The operation has timed out
24-
at System.Net.HttpWebRequest.GetResponse()
25-
at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeConnectivityDiscoverer.ValidateServerUrl(EmailDirectionCode emailDirection)"
21+
Or
2622

27-
## Cause
23+
> System.Net.WebException: The operation has timed out
24+
> at System.Net.HttpWebRequest.GetResponse()
25+
> at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeConnectivityDiscoverer.ValidateServerUrl(EmailDirectionCode emailDirection)
2826
29-
- **Cause 1:** The username or password isn't correct.
27+
## Cause 1: Incorrect username or password
3028

31-
- **Cause 2:** If you're using Dynamics 365 (online) to connect to Exchange on-premises, this error can occur if your firewall doesn't allow connectivity from Dynamics 365 to your Exchange server.
29+
To solve this issue, verify the username and password are correct.
3230

33-
- **Cause 3:** In some cases, the test connection may fail even though the credentials are correct and connectivity isn't a problem. See Resolution 3 in the Resolution section.
31+
> [!NOTE]
32+
> The **User Name** value needs to be in the UPN (User Principal Name) format. For example, use `[email protected]` instead of `contoso\username`.
3433
35-
## Resolution
34+
## Cause 2: Firewall blocking connectivity
3635

37-
- **Resolution 1:** Verify the username and password are correct.
36+
If you use Dynamics 365 (online) with Exchange on-premises, ensure your firewall allows connectivity from the list of IP ranges documented in [Power Platform URLs and IP address ranges](/power-platform/admin/online-requirements#ip-addresses-and-urls) including the referenced [Azure IP ranges](/power-platform/admin/online-requirements#ip-addresses-required).
3837

39-
> [!NOTE]
40-
> The User Name value needs to be in UPN (User Principal Name) format. Ex. `[email protected]` instead of `contoso\username`.
38+
## Cause 3: Unreliable test connection results
4139

42-
- **Resolution 2**: If you're using Dynamics 365 (online) with Exchange on-premises, verify your firewall allows connectivity from the list of IP ranges documented in [Microsoft Dynamics CRM Online IP Address Ranges](https://support.microsoft.com/help/2728473) including the referenced [Azure IP ranges](https://support.microsoft.com/help/2728473).
40+
The test connection results aren't always reliable. If the same username and password works when [testing connection with Microsoft Remote Connectivity Analyzer](/power-platform/admin/test-connection-exchange-server-onpremises#test-connection-with-the-microsoft-remote-connectivity-analyzer), use the [Test & Enable Mailboxes](/power-platform/admin/connect-exchange-online#test-the-configuration-of-mailboxes) option in Dynamics 365 instead of the **Test Connection** option. If the **Test & Enable Mailboxes** is successful for your mailboxes, you can disregard the results from the **Test Connection** dialog.
4341

44-
- **Resolution 3:** The Test Connection results aren't always reliable. If the same username and password works when doing a test connection from [Microsoft Remote Connectivity Analyzer](https://testconnectivity.microsoft.com/tests/o365), use the Test & Enable Mailboxes option in Dynamics 365 instead of the Test Connection option. If the Test & Enable is successful for your mailboxes, you can disregard the results from the **Test Connection** dialog.
42+
> [!NOTE]
43+
> If any failures occur using the **Test & Enable Mailboxes** button, see the **Alerts** tab in the mailbox record and review any help links that are included.
4544
46-
> [!NOTE]
47-
> If any failures occur using the Test & Enable Mailboxes button, see the **Alerts** tab within the mailbox record and review any help links that are included.
45+
## More information
46+
47+
- [Connect to Exchange Server (on-premises)](/power-platform/admin/connect-exchange-server-on-premises)
48+
- [Test connection to Exchange Server (on-premises)](/power-platform/admin/test-connection-exchange-server-onpremises)
49+
- [Connect Customer Engagement (on-premises) to Exchange Online](/dynamics365/customerengagement/on-premises/admin/connect-dynamics-365-on-premises-exchange-online)

0 commit comments

Comments
 (0)