Skip to content

Commit f92a70b

Browse files
authored
minor changes
1 parent 60771e4 commit f92a70b

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

support/power-platform/dataverse/email-exchange-synchronization/http-server-returned-forbidden-exception.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,72 +5,72 @@ ms.reviewer:
55
ms.date: 12/10/2024
66
ms.custom: sap:Email and Exchange Synchronization
77
---
8-
# "Http server returned Forbidden exception" error appears in Microsoft Dynamics 365 mailbox
8+
# "Http server returned Forbidden exception" error when testing a Dynamics 365 mailbox
99

10-
This article provides a solution to an error that occurs when you select the **Test & Enable Mailbox** button on a mailbox record in Dynamics 365.
10+
This article provides a solution to an error that occurs when you select the **Test & Enable Mailbox** button on a mailbox record in Microsoft Dynamics 365.
1111

1212
_Applies to:_   Microsoft Dynamics 365
1313
_Original KB number:_   4483440
1414

1515
## Symptoms
1616

17-
When you select the **Test & Enable Mailbox** button on a mailbox record in Dynamics 365, the test results section shows Failure and the following alert is logged:
17+
When you select the **Test & Enable Mailbox** button on a mailbox record in Dynamics 365, the test results section shows **Failure** and the following alert is logged:
1818

19-
> "The email message "Your mailbox is now connected to Dynamics 365" cannot be sent because an error occurred while establishing a secure connection to the email server. Mailbox [Mailbox Name] didn't synchronize. The owner of the email server profile Microsoft Exchange Online has been notified.
20-
Email Server Error Code: Http server returned Forbidden exception."
19+
> The email message "Your mailbox is now connected to Dynamics 365" cannot be sent because an error occurred while establishing a secure connection to the email server. Mailbox [Mailbox Name] didn't synchronize. The owner of the email server profile Microsoft Exchange Online has been notified.
20+
> **Email Server Error Code**: Http server returned Forbidden exception.
2121
22-
If you select **Details**, the following other details are shown:
22+
If you select **Details**, the following details are shown:
2323

24-
> "Error : System.Net.WebException: The request failed with HTTP status 403: Forbidden.
25-
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
26-
at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
27-
at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeServiceBinding.EndCreateItem(IAsyncResult asyncResult)
28-
at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeOutgoingEmailProvider.EndCreateItem()"
24+
> Error : System.Net.WebException: The request failed with HTTP status 403: Forbidden.
25+
> at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
26+
> at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
27+
> at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeServiceBinding.EndCreateItem(IAsyncResult asyncResult)
28+
> at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeOutgoingEmailProvider.EndCreateItem()
2929
3030
## Cause
3131

32-
Dynamics 365 communicates with Microsoft Exchange using Exchange Web Services (EWS) requests. If EWS is disabled, this error will occur. The following contents are some potential ways that EWS may be disabled or restricted in Exchange:
32+
Dynamics 365 communicates with Microsoft Exchange using Exchange Web Services (EWS) requests. If EWS is disabled, this error will occur. Here are some potential ways that EWS might be disabled or restricted in Exchange:
3333

34-
1. EWS is disabled for the mailbox
35-
2. EWS is disabled for the entire organization
36-
3. The `EwsApplicationAccessPolicy` is set to **EnforceAllowList** and `the EwsAllowList` doesn't allow access from Dynamics 365 (CRM).
37-
4. The `EwsApplicationAccessPolicy` is set to **EnforceBlockList** and `the EwsBlockList` includes Dynamics 365 (CRM).
34+
1. EWS is disabled for the mailbox.
35+
2. EWS is disabled for the entire organization.
36+
3. The `EwsApplicationAccessPolicy` is set to **EnforceAllowList** and the `EwsAllowList` doesn't allow access from Dynamics 365.
37+
4. The `EwsApplicationAccessPolicy` is set to **EnforceBlockList** and the `EwsBlockList` includes Dynamics 365.
3838

3939
## Resolution
4040

41-
**If the issue only occurs for some mailboxes, check if EWS is disabled for the mailbox:**
41+
### Check if EWS is disabled for the mailbox if the issue only occurs for some mailboxes
4242

43-
1. First check to see if EWS has been disabled for the mailbox. Use the following PowerShell command:
43+
1. First, check if EWS is disabled for a specific mailbox using this PowerShell command:
4444

4545
```powershell
4646
Get-CASMailbox <mailbox-alias> | ft EwsEnabled
4747
```
4848
49-
2. If **EwsEnabled** is set to **False**, use the following PowerShell command to enable Exchange Web Services (EWS) for the mailbox:
49+
2. If **EwsEnabled** is set to **False**, enable it using this command:
5050
5151
```powershell
5252
Set-CASMailbox <mailbox-alias> -EwsEnabled $True
5353
```
5454
5555
> [!IMPORTANT]
56-
> After running this command, it may take up to 120 minutes before the setting change takes effect.
56+
> After running this command, it might take up to 120 minutes before the setting change takes effect.
5757
58-
**If the issue occurs for all mailboxes, check if EWS is disabled at the organization level, or if the EwsAllowList is being used to limit what EWS traffic is allowed.**
58+
## Check if EWS is disabled at the organization level or if the EwsAllowList limits the EWS traffic if the issue occurs for all mailboxes
5959
60-
1. Use the following PowerShell command to see if any of the EWS settings are configured:
60+
1. Use this PowerShell command to check organization-level settings:
6161
6262
```powershell
6363
Get-OrganizationConfig |ft Name, EwsEnabled,EwsApplicationAccessPolicy,EwsBlockList,EwsAllowList
6464
```
6565
66-
2. Verify that **EwsEnabled** isn't set to **False**. The following command can be used to set **EwsEnabled** to **True** if it's currently set to **False**:
66+
2. Ensure that `EwsEnabled` isn't set to **False**. If it is, enable it using:
6767
6868
```powershell
6969
Set-OrganizationConfig -EwsEnabled $True
7070
```
7171
7272
> [!IMPORTANT]
73-
> After running this command, it may take up to 120 minutes before the setting change takes effect.
73+
> After running this command, it might take up to 120 minutes before the setting change takes effect.
7474
7575
3. If `EwsApplicationAccessPolicy` is set to **EnforceAllowList** and the `EwsAllowList` doesn't contain a value for CRM (Example: CRM/\*), which would prevent Dynamics 365 (CRM) from being able to communicate with Exchange. Use the following command to update the list to include CRM/* and whatever other applications you want to allow (\<PreviousAllowList> in the following example):
7676
@@ -79,16 +79,16 @@ Dynamics 365 communicates with Microsoft Exchange using Exchange Web Services (E
7979
```
8080
8181
> [!IMPORTANT]
82-
> After running this command, it may take up to 120 minutes before the setting change takes effect.
82+
> After running this command, it might take up to 120 minutes before the setting change takes effect.
8383
84-
4. If `EwsApplicationAccessPolicy` is set to **EnforceBlockList** and the **EwsAllowList** contains a value for CRM (Example: CRM/*), which would prevent Dynamics 365 (CRM) from being able to communicate with Exchange. Use the following command to update the list to no longer include CRM:
84+
4. If `EwsApplicationAccessPolicy` is set to **EnforceBlockList** and the `EwsAllowList` contains a value for CRM (Example: CRM/*), which would prevent Dynamics 365 (CRM) from being able to communicate with Exchange. Use the following command to update the list to no longer include CRM:
8585
8686
```powershell
8787
Set-OrganizationConfig -EwsApplicationAccessPolicy:EnforceBlockList -EwsBlockList:<PreviousBlockList WITH CRM REMOVED>
8888
```
8989
9090
> [!IMPORTANT]
91-
> After running this command, it may take up to 120 minutes before the setting change takes effect.
91+
> After running this command, it might take up to 120 minutes before the setting change takes effect.
9292
9393
## More information
9494

0 commit comments

Comments
 (0)