"NoPrimarySmtpAddress" error when accessing shared mailboxes through POP/IMAP in Exchange Server
Article
Applies to:
Exchange Server 2010 Service Pack 3, Exchange Server 2013, Exchange Server 2013 Service Pack 1, Exchange Server 2016, Exchange Server 2019
Symptoms
Consider the following scenario:
You're running Microsoft Exchange Server 2019, Exchange Server 2016, or Exchange Server 2013.
Exchange Server is configured for POP/IMAP access.
Shared mailboxes in the Exchange environment are configured to enable POP/IMAP access.
A service account that isn't mail-enabled is granted permissions to the shared mailboxes.
In this scenario, users can't access the shared mailboxes through POP/IMAP by using the service account. Additionally, you see an error message in the POP/IMAP protocol logs that resembles the following:
"R=""? NO LOGIN failed:"";Msg=NoPrimarySmtpAddress"
When this problem occurs, the service account can still access the shared mailboxes through Microsoft Outlook, Outlook Web App, Exchange Web Services, or Exchange ActiveSync.
Cause
This problem occurs because the POP/IMAP authentication process expects authenticated users to have a primary SMTP address defined.
Resolution
To fix this problem, use either of the following methods (but only one).
Method 1: Create a mailbox for the service account
Use the Exchange Admin Center or Exchange Management Shell to create a mailbox for the service account. For more information about how to create a mailbox for an existing user, see Create user mailboxes in Exchange Server.
Method 2: Add a primary SMTP address to the proxyAddresses attribute
Add a primary SMTP address to the proxyAddresses attribute for the service account by using Active Directory Users and Computers. To do this, follow these steps:
Open Active Directory Users and Computers.
Select View > Advanced Features.
Find the user object for the service account.
Right-click the object, and then select Properties.
Select the Attribute Editor tab.
Find the userPrincipalName attribute and note the attribute value (for example, serviceaccount01@contoso.com).
Find the proxyAddresses attribute, and then select Edit.
In the Value to add text box, add the following text to set a primary SMTP address, and then select the Add button:
SMTP:serviceaccount01@contoso.com
Select OK two times, and then close Active Directory Users and Computers.
After you make this change, ask users to access the shared mailboxes again through POP/IMAP.
This module examines how clients connect to Microsoft 365. It also provides instruction on how to configure name resolution and Outlook clients, and how to troubleshoot client connectivity.