How to manage server connections

This article describes how to create and manage server connections. You will also learn about solutions to the most common connection issues. Use the links below to learn more about:

Creating a new server connection

To connect to a server you need to open the Server connection wizard. There are three ways to launch the wizard:

  • On the Dashboard of the Administration Panel, click the Manage (Backup - Icon.) button in the upper-right corner of the Defined server connections card (Fig. 1.). In the Manage server connections window that appears, click New.
Backup - Defining server connection.
Fig. 1. Opening the server connection wizard via the Defined server connections card.
  • If it is a new installation of the program or you do not have any backup jobs created yet, click the Start a new job wizard link on the How to start card of the Dashboard view. In the Create backup job wizard, go to the Server connection step, click Manage and then New (Fig. 2.).
Backup - Starting new job wizard small.
Fig. 2. Opening the server connection wizard via the How to start card.
  • Go to the Jobs view in the Administration Panel and choose New > Backup from the top menu bar. In the window that appears, go to the Server connection step, click Manage and then New (Fig. 3.).
Backup - add new connection
Fig. 3. Opening the Server connection wizard via the Jobs tab.

The Server connection wizard enables connection to two supported server types (Fig. 4.):

Backup - Server type
Fig. 4. The first step of the Server connection wizard.

Connecting to on-premises Exchange Server

After choosing the on-premises Exchange Server option, define the way how the program will connect (the Server connection step). To connect to a server from the same domain as the machine equipped with the program, use the Autodiscover Exchange Server option. Your server will be located automatically.

If you want to set up a connection to a server from a different domain, you need to enter the server's location manually. Select Configure connection manually and enter the server's Fully Qualified Domain Name (DNS) (Fig. 5.). The server's FQDN consists of the server's name followed by the domain name, e.g. myserversname.domain.com.

Backup - connection manually
Fig. 5. Manually configuring the Exchange Server's location.

Warning

If you use the IP address of a server from your domain instead of its name, the program will not be able to grant you impersonation rights on users' mailboxes or enumerate target mailboxes. As a result, you will get errors (failure notifications) after your connection settings are verified and the program will not be able to run any jobs via such a connection.

In the next step (Admin's credentials), you will find that the UPN of your server's administrator is automatically added by the program (Fig. 6.).

Backup - local UPN
Fig. 6. An administrator's UPN proposed automatically by the program.

Important

Make sure that your target server's administrator has an active mailbox and that his UPN is configured. Otherwise, the program may work incorrectly and errors (failure notifications) are likely to appear while verifying the connection settings.

To use a UPN of a different administrator account, enter it manually or automatically via the Browse button. Once you select the Browse button (Fig. 7.), you will be able to pull an appropriate UPN from your Active Directory; by clicking Locations you can determine from which domain the on-premises server administrator's UPN will be taken.

Backup - Choosing domains.
Fig. 7. Choosing a domain to search for an administrator's UPN.

Info

The Browse button can only be used to list the UPNs of administrators from the same domain or from different trusted domains. If you want to use a UPN from an untrusted domain, you will have to type it manually.

After selecting an administrator's UPN, enter the corresponding password (see Fig. 6.) and click Next to proceed.

In the Configuration step, the program applies the configuration: it checks the server connection and impersonation rights' assignment status, and tries to enumerate target mailboxes by using PowerShell. To start the process of verification, click Configure and wait for the results (Fig. 8.).

Backup - successful
Fig. 8. Verification of the server connection.

This step also offers additional configuration options (see Fig. 8.), e.g. to create a new throttling policy with higher throughput or to change the EWS request size limit. You can also check the administrator's impersonation rights on a selected user mailbox - to do so, click the Test link next to Test connection to your Exchange Server. This will open a mailbox selection window (Fig. 9). Choose a mailbox and click Test to run the test.

Backup - Test impersonation rights.
Fig. 9. The impersonation rights test window.

After confirming your server's connection settings, you will be able to use this connection to create backups of mailboxes residing on this server and restore them to a chosen target location.

Info

After closing the connection wizard via the Finish button (see Fig. 8.), you need to click OK in the Manage server connections window (Fig. 10.) to save your connection. This will automatically close the window and store your settings.

Backup - Confirm connection small.
Fig. 10. Confirming the connection settings.

Connecting to Office 365

After choosing Office 365 (see Fig. 4.), enter your global administrator's credentials (Fig. 11.).

Backup - Office 365 credentials
Fig. 11. Entering Office 365 Administrator's credentials.

In the next, final step (Configuration) the program applies the configuration: it checks the server connection and the impersonation rights' status on user mailboxes, and tries to enumerate target mailboxes by using PowerShell (Fig. 12.). Click Configure to proceed with verifying your connection settings.

Backup - successful
Fig. 12. Verifying Office 365 connection settings.

This step also offers additional configuration options (see Fig. 12.) such as creating a new throttling policy with higher throughput or changing the EWS request size limit.

You can also check the administrator's impersonation rights on a selected user's mailbox. Click the Test link at the bottom (Fig. 12.). The impersonation rights test window will appear. Click Browse to open a user selection window (Fig. 13.). This window shows a list of all Office 365 users with their names and email addresses (Fig. 13.).

Backup - Browse O365 users.
Fig. 13. Browsing Office 365 users.

Info

Be advised that the values in the User name column are NOT taken from the user's properties (such as UserPrincipalName, DisplayName, FirstName, LastName or mailbox aliases, etc.

Instead, these are CommonName (CN) values from the DistinguishedName property (see MSDN and Technet for more information). Sometimes this identifier may be different than the actual name of a user or the user's mailbox alias. If you want to view or edit the CN value, connect to your Exchange on-premises or Exchange Online (Office 365) via PowerShell and check or assign the value of mailbox property name using get-mailbox or set-mailbox cmdlets.

To pick a user, select a person on the list and click OK. Next, click Test to check the impersonation rights (Fig. 14.).

Backup - Test O365 user.
Fig. 14. The impersonation rights test window.

Info

You can select only one user at a time to perform the test. If the user you want to perform the test on is not listed, clicking Refresh may help. This will reload the list of users.

After confirming your server connection settings, you will be able to use this connection to create backups of mailboxes residing on your Office 365 and restore them to a chosen target location.

Tip

After closing the connection wizard via the Finish button (see Fig. 12.), you need to click OK in the Manage server connections window to save your connection (Fig. 15.). This will automatically close the window and store your settings.

Backup - Confirm O365 connection small.
Fig. 15. Confirming the connection settings.

Managing existing server connections

All server connections defined in the program can be easily configured via the Manage server connections window.

To open this window, go the Dashboard of the Administration Panel and click the Manage (Backup - Icon.) button in the upper-right corner of the Defined server connections card (Fig. 16.).

Backup - Open connection management window.
Fig. 16. Opening the server connection management window.

The Manage server connections window allows you to create new connections, edit any previously defined connections or delete them, if necessary (Fig. 17.).

Important

After you apply any changes to server connections, remember to save them by clicking OK (Fig. 17.). 

Backup - Managing server connections.
Fig. 17. Editing/deleting a server connection.

Info

The existing connections can be edited or deleted at any point even if they are used by active jobs. This does not affect any active jobs because each running job keeps a copy of the previously defined server connection. This mechanism ensures that a job's operation remains uninterrupted even if you delete or change its current server connection settings.

Changes applied to server connections will only impact a job when you restart it.

Troubleshooting server connection issues

This part describes the most common problems associated with connecting to Office 365 and on-premises Exchange servers, along with typical solutions. Use the links to learn more.

Troubleshooting Office 365 connection

When you verify connection settings in the last step of the Server connection wizard, the program performs three actions: checks your server connection, attempts to grant impersonation rights on user mailboxes and tries to enumerate target mailboxes by using PowerShell. If the program fails to perform any of these actions, it will display failure notifications (Fig. 18.).

Backup Office 365 connection wizard failures
Fig. 18. Failure notifications when configuring connection to Office 365.

Click on the links below to learn about possible causes and solutions for each of these errors.

Office 365 connectivity

First, the program checks if it can establish a connection to the target Office 365. The program tries to access the administrator's mailbox with EWS (Exchange Web Services) API. Next, it attempts to enumerate the Inbox folder of this mailbox.

Any failure will result in the following notification: Failed to connect to Exchange Server (see Fig. 18.). Click on the Failure link on the right side of the notification to view details on the error. The examples below show the most common error messages.

  • The request failed. The remote server returned an error: (401) Unauthorized.

The error above indicates that the administrator's credentials entered in the previous step of the Server connection wizard are incorrect or belong to a non-administrative user. To fix the problem, make sure to enter proper administrator's credentials.

Learn more about this error

  • The request failed. Unable to connect to the remote server.

This error occurs if the domain name in the administrator's email address is misspelled or the password is wrong. To fix the problem, go to the previous step of the connection wizard and make sure to enter correct credentials.

  • The Autodiscover service couldn't be located.

Read more about this error in this Knowledge Base article.

  • The given key was not present in the dictionary.

Read more about this error in this Knowledge Base article.

Office 365 administrator's impersonation rights

The second action performed by the program is to check if an administrator, whose email address was entered in the previous step of the wizard, has application impersonation rights. The program does so by running the PowerShell command: Get-ManagementRoleAssignment. If the result is negative, the program tries to add such rights to the administrator account.

Any failure will result in the following notification: Failed to grant the impersonation rights (see Fig. 18.). Click on the Failure link on the right side of the notification to view details on the error. The examples below show the most common error messages.

  • The server could not be contacted. The LDAP server is unavailable.

This error might be caused by missing impersonation rights. The wizard tries to grant them automatically, but when it fails, the above message is shown.

Follow our Knowledge Base article to grant application impersonation rights manually and fix this issue.

  • Cannot bind parameter 'Name' to the target.

Read more about this error in this Knowledge Base article.

Office 365 PowerShell console connectivity

The last action is to check PowerShell connectivity to the target Office 365. After connecting to the target, the program tries to execute the Get-Mailbox PowerShell cmdlet to enumerate all mailboxes.

Any failure will result in the following notification: Failed to connect to target PowerShell (see Fig. 18.). Click on the Failure link on the right side of the notification to view details on the error. The examples below show the most common error messages.

  • Connecting to remote server failed with the following error message: The WinRM client cannot process the request.

This error occurs if the domain name in the administrator's email address is misspelled or the password is wrong. To fix the problem, go to the previous step of the connection wizard and make sure to enter correct credentials.

The error above can also indicate that the credentials entered in the previous step of the wizard belong to a non-administrative user. To fix the problem, make sure to enter proper administrator's credentials.

Troubleshooting on-premises Exchange Server connection

Typical connection problems for on-premises Exchange servers are described below.

Exchange server name vs. IP address

There are two connection options available in the Server connection step of the connection wizard (Fig. 19.). If you choose the manual connection, you should type the name of the server instead of its IP. If you use the IP address of the server (Fig. 19.), the software will not be able to grant you impersonation rights, and the result will be the inability to list the server’s mailboxes.

Backup - IP connection
Fig. 19. Manual connection via the IP address of a server.

Moreover, in such a case the program will not be able to run any job, even if you decide to grant the impersonation rights manually. You will also get failure notifications when your connection is verified in the last step of the connection wizard (see Fig. 20.).

Backup - impersonation rights error while using server's IP address
Fig. 20. Impersonation rights cannot be set automatically if a connection was established using the IP address of a server.

Exchange Server connectivity

When you verify connection settings in the last step of the Server connection wizard, the program performs three actions: checks your server connection, attempts to grant impersonation rights on user mailboxes and tries to enumerate target mailboxes by using PowerShell. If the program fails to perform any of these actions, it will display failure notifications (Fig. 21.).

Backup Exchange connection wizard failures
Fig. 21. Failure notifications when verifying connection to Exchange Server.

The first action is to check if the program can establish a connection to the target on-premises Exchange server, using the administrator's User Principal Name. The program tries to access the admin's mailbox using EWS (Exchange Web Services) API. Next, it attempts to enumerate the Inbox folder of this mailbox.

Any failure will result in the following notification: Failed to connect to Exchange Server (see Fig. 21.). Click on the Failure link on the right side of the notification to view details on the error. The examples below show the most common error messages.:

  • The request failed. The remote server returned an error: (401) Unauthorized.

The error above indicates that the administrator's credentials entered in the previous step of the Server connection wizard are incorrect or belong to a non-administrative user. To fix the problem, make sure to enter proper administrator's credentials.

  • The request failed. Unable to connect to the remote server.

This error occurs if the domain name in the administrator's email address is misspelled or the password is wrong. To fix the problem, go to the previous step of the connection wizard and make sure to enter correct credentials. A similar message is also shown if the EWS URL is wrong. In that case, go to the first step of the wizard and enter a correct EWS URL.

  • Failed to find in Active Directory an email address for [email address].
  • Exchange Server doesn't support the requested version.

These errors appear after you choose the target Exchange Server version that is not supported by the program. CodeTwo Backup can be used to back up mailboxes for the following versions of Exchange Servers: 2013 and 2010 SP1 or newer.

  • Invalid URL: The URL is empty.

This error indicates that the administrator, whose email address was used in the previous step of the connection wizard, does not have an active mailbox. To resolve this issue, make sure that the administrator has a mailbox and it is active.

  • The request failed. The remote server returned an error: (403) Forbidden.

Read more about this error in this Knowledge Base article.

  • Error: (407) Proxy Authentication Required.

Read more about this error in this Knowledge Base article.

Important

Make sure that the administrator whose email address is used to connect to Exchange Server, has his User Principal Name configured. Otherwise, the program may work incorrectly and errors are likely to appear.

Exchange Server administrator's impersonation rights

The second action performed by the program is to check if an administrator, whose email address was entered in the previous step of the wizard, has application impersonation rights. The program does so by running the PowerShell cmdlet: Get-ManagementRoleAssignment. If the result is negative, the program tries to add such rights to the administrator account.

Any failure will result in the following notification: Failed to grant the impersonation rights (see Fig. 21.). Click on the Failure link on the right side of the notification to view details on the error. The examples below show the most common error messages:

  • The server could not be contacted. The LDAP server is unavailable.

This error might be caused by missing impersonation rights. The wizard tries to grant them automatically, but when it fails, the above error is shown.

Follow our Knowledge Base article to learn how to grant application impersonation rights manually and fix this issue.

  • Cannot bind parameter 'Name' to the target.

Read more about this error in this Knowledge Base article.

Exchange Server's PowerShell console connectivity

The last action is to check the remote PowerShell connectivity to the target Exchange Server. After connecting to the target, the program tries to execute the Get-Mailbox PowerShell cmdlet to enumerate all mailboxes.

Any failure will result in the following notification: Failed to connect to target PowerShell (see Fig. 21.). Click on the Failure link on the right side of the notification to view details on the error. The examples below show the most common error messages.

  • Connecting to remote server failed with the following error message: The WinRM client cannot process the request.

This error occurs if the domain name in the administrator's email address is misspelled or the corresponding password is wrong. To fix the problem, go to the previous step of the connection wizard and make sure to enter correct credentials.

A similar message is also shown if the EWS URL is wrong. In that case, go to the first step of the wizard and enter a correct EWS URL.

The error above can also indicate that the credentials entered in the previous step are incorrect or belong to a non-administrative user. To fix the problem, make sure to enter proper administrator's credentials.

See also

Server connection - learn how the server connection mechanism works, how it influences the process of executing multiple jobs and how the program handles the server load.
Learn more about assigning admin roles in Office 365

Was this information useful?