You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Provides a solution to an error that occurs when you use Server-Side Synchronization in Dynamics 365.
2
+
title: 401 Unauthorized exception when using server-side synchronization
3
+
description: Provides a solution to an error that occurs when you use server-side synchronization in Dynamics 365.
4
4
ms.reviewer: dmartens
5
-
ms.topic: troubleshooting
6
-
ms.date: 11/19/2024
5
+
ms.date: 12/11/2024
7
6
ms.custom: sap:Email and Exchange Synchronization
8
7
---
9
-
# 401 Unauthorized exception occurs in Microsoft Dynamics 365 when using Server-Side Synchronization
8
+
# 401 Unauthorized exception occurs when using server-side synchronization in Microsoft Dynamics 365
10
9
11
-
This article provides a solution to an error that occurs when you use Server-Side Synchronization in Dynamics 365.
10
+
This article presents possible causes and solutions for errors that might occur when you use server-side synchronization in Microsoft Dynamics 365.
12
11
13
12
_Applies to:_ Microsoft Dynamics 365
14
13
_Original KB number:_ 3212785
15
14
16
15
> [!IMPORTANT]
17
-
> If you are using Exchange Online and this error occurs after October 1st, 2022, this may be caused by Basic authentication being disabled. For more information about how to temporarily enable Basic authentication again for a limited time, see [Use of Basic authentication with Exchange Online](/power-platform/admin/use-basic-authentication-exchange-online).
16
+
> If you use Exchange Online and this error occurs after October 1st, 2022, this may be caused by Basic authentication being disabled. For more information about how to temporarily enable Basic authentication again for a limited time, see [Use of Basic authentication with Exchange Online](/power-platform/admin/use-basic-authentication-exchange-online).
18
17
19
18
## Symptoms
20
19
21
-
When you use Server-Side Synchronization in Dynamics 365, you receive one of the following errors:
20
+
When you use [server-side synchronization](/power-platform/admin/server-side-synchronization) in Dynamics 365, you receive one of the following errors:
22
21
23
22
> - The email message "Test Message" cannot be sent. Make sure that the credentials specified in the mailbox \<Mailbox Name> are correct and have sufficient permissions for sending email. Then, enable the mailbox for email processing.
24
23
@@ -30,29 +29,32 @@ The message also includes the following error code:
30
29
31
30
> Email Server Error Code: Http server returned 401 Unauthorized exception.
32
31
33
-
## Cause
32
+
## Cause 1: The e-mail address in Dynamics 365 doesn't match the one in Exchange
34
33
35
-
These errors can occur for one of the following reasons:
34
+
To solve this issue, verify the email address of the mailbox record in Dynamics 365 matches the one in Exchange. The error includes a link to the mailbox record in Dynamics 365. You can use this link to quickly verify the **Email Address** field.
36
35
37
-
1. The e-mail address of the mailbox record in Dynamics 365 doesn't match the e-mail address of the mailbox in Exchange.
38
-
2. If you're using Dynamics 365 (online) with Exchange Online, this error can occur if you're using an Exchange Server (Hybrid) profile even though the user's mailbox is located in Exchange Online.
39
-
3. If you're using Dynamics 365 with Exchange Online, this error can occur if the user doesn't have an Exchange Online license.
40
-
4. If you're using Dynamics 365 (online) with Exchange Online, this error can occur if your Dynamics 365 subscription isn't in the same Office 365 tenant as your Exchange Online subscription. When using an Exchange Online email server profile, Dynamics 365 (online) and Exchange Online need to be in the same Office 365 account/tenant.
41
-
5. If you're using Dynamics 365 (online) with Exchange on-premises, this error can occur if Basic authentication isn't enabled for EWS (Exchange Web Services).
42
-
6. The user or mailbox that had been deleted was later recreated by using the same email address.
36
+
## Cause 2: Using an Exchange Server (Hybrid) profile with a mailbox in Exchange Online
43
37
44
-
When you try to test and enable the mailbox, you may see that the **NoUserFoundWithGivenClaims** message is included as part of an error level alert. You may also see an alert where the details section shows, "User does not exist in tenant with id '\<_User ID_>'".
38
+
If you use Dynamics 365 (online) with Exchange Online, make sure you use an [Exchange Online email server profile](/power-platform/admin/connect-exchange-online#create-an-email-server-profile-for-exchange-online). Only use an Exchange Server (Hybrid) profile for users that have mailboxes in Exchange on-premises. For more information, see [Connect to Exchange Server (on-premises)](/power-platform/admin/connect-exchange-server-on-premises).
45
39
46
-
## Resolution
40
+
## Cause 3: The user doesn't have an Exchange Online license
47
41
48
-
To fix this issue, use the following steps:
42
+
If you use Dynamics 365 with Exchange Online, verify the user has an Exchange Online license. For more information about assigning licenses in Microsoft 365, see [Add users and assign licenses at the same time](/microsoft-365/admin/add-users/add-users).
49
43
50
-
1. Verify the e-mail address of the mailbox record in Dynamics 365 matches the e-mail address in Exchange. The error includes a link to the mailbox record in Dynamics 365. You can use this link to quickly verify the Email Address field.
51
-
2. If you're using Dynamics 365 (online) with Exchange Online, make sure you're using an Exchange Online email server profile. Only use an Exchange Server (Hybrid) profile for users that have mailboxes in Exchange on-premises.
52
-
3. If you're using Dynamics 365 with Exchange Online, verify the user has an Exchange Online license. For more information about assigning licenses in Office 365, see [Add users and assign licenses at the same time](/microsoft-365/admin/add-users/add-users).
53
-
4. If you're using Dynamics 365 (online) with Exchange Online, verify Dynamics 365 (online) and Exchange Online are in the same Office 365 account/tenant.
54
-
5. If you're using Dynamics 365 (online) with Exchange on-premises, verify Basic authentication is enabled for EWS (Exchange Web Services). For more information, see the Prerequisites section of [Connect Dynamics 365 (online) to Exchange Server (on-premises)](/previous-versions/dynamicscrm-2016/administering-dynamics-365/mt622059(v=crm.8)).
55
-
6. If the user or mailbox that had been deleted was later recreated by using the same email address:
44
+
## Cause 4: Dynamics 365 and Exchange Online aren't in the same Microsoft 365 tenant
56
45
57
-
1. Make sure that the previously existing user or mailbox was permanently deleted. By default, a user who is deleted from Microsoft Entra ID can have their account restored within 30 days. For more information, see [Permanently delete a user](/azure/active-directory/fundamentals/active-directory-users-restore#permanently-delete-a-user).
58
-
2. After verifying that no user or mailbox uses the same email address, you can try to test and enable the mailbox again. If you still receive the error message, the issue can be caused by the result of caching. It may take up to 72 hours for the cache to be cleared. If you can't wait for 72 hours, contact [Microsoft Support](https://support.microsoft.com).
46
+
If you use Dynamics 365 (online) with Exchange Online, verify Dynamics 365 (online) and Exchange Online are in the same Microsoft 365 account or tenant.
47
+
48
+
## Cause 5: Basic authentication isn't enabled for EWS (Exchange Web Services)
49
+
50
+
If you use Dynamics 365 (online) with Exchange on-premises, verify Basic authentication is enabled for [EWS (Exchange Web Services)](/exchange/client-developer/exchange-web-services/start-using-web-services-in-exchange). For more information, see the Prerequisites section of [Connect Dynamics 365 (online) to Exchange Server (on-premises)](/previous-versions/dynamicscrm-2016/administering-dynamics-365/mt622059(v=crm.8)#prerequisites).
51
+
52
+
## Cause 6: A deleted user or mailbox is re-created with the same email address
53
+
54
+
When you try to test and enable the mailbox, you might see that the **NoUserFoundWithGivenClaims** message is included as a part of an error level alert. You might also see a "User does not exist in tenant with id '\<User ID\>'" message in the **Details** section of the alert.
55
+
56
+
To solve this issue:
57
+
58
+
1. Make sure that the previously existing user or mailbox is permanently deleted. By default, a user who is deleted from Microsoft Entra ID can have their account restored within 30 days. For more information, see [Permanently delete a user](/azure/active-directory/fundamentals/active-directory-users-restore#permanently-delete-a-user).
59
+
60
+
1. After verifying that no user or mailbox uses the same email address, you can try to test and enable the mailbox again. If you still receive the error message, it may be due to caching. It might take up to 72 hours for the cache to be cleared. If you can't wait for 72 hours, contact Microsoft Support through the **Help + Support** experience in the [Power Platform admin center](https://admin.powerplatform.microsoft.com/support).
Copy file name to clipboardExpand all lines: support/power-platform/dataverse/email-exchange-synchronization/the-smtp-address-has-no-mailbox.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,37 +1,36 @@
1
1
---
2
-
title: The SMTP address has no mailbox
3
-
description: Provides a solution to an error that occurs when you select Test Connection on an Email Server Profile record in Dynamics 365.
2
+
title: SMTP address has no mailbox associated with it error
3
+
description: Solves an SMTP address error that occurs when you select Test Connection on an email server profile record in Dynamics 365.
4
4
ms.reviewer:
5
-
ms.topic: troubleshooting
6
-
ms.date: 11/19/2024
5
+
ms.date: 12/11/2024
7
6
ms.custom: sap:Email and Exchange Synchronization
8
7
---
9
-
# The SMTP address has no mailbox associated with it error occurs in Microsoft Dynamics 365
8
+
# "The SMTP address has no mailbox associated with it" error when selecting Test Connection
10
9
11
-
This article provides a solution to an error that occurs when you select **Test Connection** on an Email Server Profile record in Dynamics 365.
10
+
This article provides a solution to an error that occurs when you select **Test Connection** on an email server profile record in Microsoft Dynamics 365.
12
11
13
12
_Applies to:_ Microsoft Dynamics 365
14
13
_Original KB number:_ 3214326
15
14
16
15
## Symptoms
17
16
18
-
When you select **Test Connection**on an Email Server Profile record in Dynamics 365, you meet a Test Failed error. The Failure Details section contains the following message:
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, a "Test Failed" error occurs. The **Failure Details** section shows the following message:
19
18
20
-
> "The SMTP address has no mailbox associated with it."
19
+
> The SMTP address has no mailbox associated with it.
21
20
22
21
## Cause
23
22
24
-
This error can occur if you use the format `domain\username`for the User Name (Example:`contoso\user`).
23
+
This error can occur if the **User Name** field in the email server profile record is populated using the `domain\username`format instead of the UPN format (for example,`contoso\user`).
25
24
26
25
## Resolution
27
26
28
-
Within the Credentials section of the Email Server Profile record, use the UPN format (Example: `[email protected]`) for the User Nameinstead of `domain\username` format.
27
+
Use the UPN format (for example, `[email protected]`) for the **User Name** field instead of the `domain\username` format in the **Credentials** section of the email server profile record.
29
28
30
-
If the User Name is in the UPN format and you still meet this error, verify a mailbox exists for the user and the UPN value in the User Name field matches the email address for the user's mailbox in Exchange.
29
+
If the user name is in the UPN format and you still receive this error, verify that the user has a mailbox and that the UPN value in the **User Name** field matches the email address for the user's mailbox in Exchange.
31
30
32
31
## More information
33
32
34
-
The following example is the Failure Details that will appear:
33
+
The following is an example of the error message and additional information about the failure shown in the **Failure Details** section:
0 commit comments