❗ Important
This article applies toProduct edition: inSync Cloud
Problem description
Exchange online restore fails with an internal error:
The primary SMTP address must be specified when referencing a mailbox.
Cause
Due to the Exchange restore API limitation, the primary SMTP address of the user must match with the email address registered in inSync.
Traceback
For procedure to download logs, see inSync user log files
📝 Note
++snip++[2018-12-22 1755:46,035] [ERROR] WRKID-22466 cloudapp-6091/799812/1003142/Exchange Online: Error creating mail folders. User: xyz@xyz.com. Error: Internal error. Response Code: 500 Text:<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s=" http://schemas.xmlsoap.org/soap/envelope/ "><s:Body><s:Fault><faultcode xmlns:a=" http://schemas.microsoft.com/exchang...ces/2006/types
">a:ErrorNonPrimarySmtpAddress</faultcode><faultstring xml:lang="en-US">The primary SMTP address must be specified when referencing a mailbox.</faultstring><detail><e:ResponseCode xmlns:e=" http://schemas.microsoft.com/exchang...es/2006/errors
">ErrorNonPrimarySmtpAddress</e:ResponseCode><e:Message xmlns:e=" http://schemas.microsoft.com/exchang...es/2006/errors
">The primary SMTP address must be specified when referencing a mailbox.</e:Message><t:MessageXml xmlns:t=" http://schemas.microsoft.com/exchang...ces/2006/types
"><t:Value Name="Primary"> xyz@abc.com </t:Value></t:MessageXml></detail></s:Fault></s:Body></s:Envelope> (#100000001)++snip++
Note:
Exchange Online Backup Workflow:
For Exchange Online Mailbox backup inSync use Graph API which is a REST-based API where the user UPN or SMTP address is provided in the request URL itself and even if the UPN and Primary SMTP address are different this API will return success.
However, for Archive Mailbox backup and Restore inSync use EWS API which is a SOAP-based API where we need to explicitly send only the Primary SMTP address in the XML request.
So, to back up/restore Archive Mailbox, the inSync Admin needs to make sure that the inSync email id = Primary SMTP address of the user.
In case the user does not have Archive Mailbox then, in the backup flow only Graph API requests were made and the backup will be finished successfully.
Exchange Online Restore Workflow:
In the restore flow, we use EWS API and pass PrimarySmtpAddress in the request XML.
So the inSync Admin needs to ensure the user’s primary SMTP address and the email address registered with inSync are the same.
In case the PrimarySmtpAddress and inSync email address are different for any user the restore will fail.
Resolution
Ensure the user's primary SMTP address and the email address registered with inSync are same. You can either change the email address registered in inSync or in Microsoft 365 admin center. The procedures for both are provided below:
To change the email address registered in inSync:
Login to the inSync Management Console and click Users.
Click the user name. This opens the user details page.
On the Summary tab, click Edit.
Replace the email address with the primary SMTP address and click Save.
To change the primary SMTP address in Microsoft 365 admin center:
Login to the Microsoft 365 admin center.
Click Users.
From the drop-down list, select Active users.
Select the user name and click Edit next to the username.
From the already populated aliases, set the email address registered in inSync as primary.
Click Save.
Verification
Restores should succeed without errors.