How to manage server connections

This article describes how to create a new server connection and manage the existing server connections. You will also learn here about solutions to the most common connection issues.

This article comprises the following sections:

Creating a new server connection

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

  • Within the Dashboard view of the Administration Panel, click the Backup - Icon. icon in the Defined server connections section. In the Manage server connections window that opens, click New (Fig. 1.).
Backup - Defining server connection.
Fig. 1. Opening the server connection wizard via the Defined server connections section.
  • If it is a new installation of the program or you do not have any backup jobs created yet, click the Start new wizard job link in the How to start section of the Dashboard view in the Administration Panel. In the Create backup job wizard, go to the Source data 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 section.
  • Go to the Jobs view in the Administration Panel and click New. In the resulting window, go to the Source data step, click Manage and then New (Fig. 3.).
Backup - add new connection
Fig. 3. Opening the server connection wizard via the Jobs view.

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

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

Connecting to on-premises Exchange Server

After choosing on-premises Exchange Server, define the way how the program will connect. To connect to the server from the same domain as the machine equipped with the program, use the Autodiscover mechanism to locate your server automatically.

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

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

Warning

If you use the IP address of the server from your domain instead of its name, the program will neither be able to grant you impersonation rights on users' mailboxes nor enumerate target mailboxes. As a result, you will receive errors after verifying your connection settings and the program will not be able to run any job using such connection.

In the next window, you will find the automatically added UPN of your server's Administrator (Fig. 6.).

Backup - local UPN
Fig. 6. The Administrator's UPN entered automatically.

Important

Make sure that the Administrator has an active mailbox and that his UPN is configured. Otherwise, the program may work incorrectly, and errors are likely to appear while verifying the connection settings.

To choose a different Administrator's UPN e-mail address, enter it manually or automatically via the Browse button. Once you select the Browse button, you will be able to pull the appropriate UPN from Active Directory. Moreover, by clicking Locations, you can determine from which domain the on-premises server Administrator's UPN will be taken (Fig. 7.).

Backup - Choosing domains.
Fig. 7. Choosing a domain to search for the Administrator's UPN.

Info

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

After selecting the Administrator's UPN, enter the corresponding password (Fig. 8.).

Backup - local UPN with password
Fig. 8. The Administrator's UPN and password provided.

The verification step checks the server's connectivity, the impersonation rights assignment status and tries to enumerate target mailboxes using PowerShell (Fig. 9.). To start the process of verification, click Configure.

Backup - successful
Fig. 9. The verification step of the server connection wizard.

This step also offers a few other configuration hints, e.g. how to create a new throttling policy with higher throughput or how to change the EWS request size limit. You can also check here the Administrator's impersonation rights on the selected user mailbox - to do so, click the blue Test link next to Test connection to your Exchange Server. This will open the mailbox selection window (Fig. 10.). Next, choose a mailbox and run the test.

Backup - Test impersonation rights.
Fig. 10. 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 the chosen target location.

Info

After closing the connection wizard, you need to click OK in the Manage server connections window to save your connection (Fig. 11.). It will automatically close the window and store your settings.

Backup - Confirm connection small.
Fig. 11. Confirming connection settings.

Connecting to Office 365

After choosing Office 365, enter your Administrator's (Global Admin) credentials including an email address and password (Fig. 12.).

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

The following step checks the server's connectivity, the impersonation rights status on users' mailboxes and tries to enumerate target mailboxes using PowerShell (Fig. 13.). Click Configure to proceed with verifying your connection settings.

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

This step also offers a few configuration hints such as creating new throttling policy with higher throughput or changing the EWS request size limit. You can also check the Administrator's impersonation rights on the selected user's mailbox. Click the Test link next to Test connection to your Exchange Server.

In the resulting window, click Browse to open the user selection window. This window shows a list of all Office 365 users with their names and email addresses (Fig. 14.).

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

Info

Be advised, User name column values are NOT taken from the most obvious user's properties such as UserPrincipalName, DisplayName, FirstName, LastName nor mailbox aliases, etc.

This is the CN value (CommonName) from DistinguishedName property (see these MSDN and Technet articles). Sometimes this identifier will be different than the actual name of the user or its mailbox alias, etc. If you want to view or edit it connect to your Exchange On-premises or Exchange Online (Office 365) using PowerShell and check or append the value of mailbox property name using get-mailbox or set-mailbox cmdlets.

To pick the user, highlight her / him on the list and click OK. Next, click Test to check the impersonation rights (Fig. 15.).

Backup - Test O365 user.
Fig. 15. 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 seems not to be listed, click Refresh. It will reload the list of users.

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

Tip

After closing the connection wizard, click OK in the Manage server connections window to save your connection (Fig. 16.). It will automatically close the window and store your settings.

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

Managing existing server connections

All server connections defined within the program can be easily managed via the Server connection management window.

To open this window, go to the Dashboard view of the Administration Panel and within the Defined server connection section click Backup - Icon. (Fig. 17.).

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

This window lets you create a new connection and edit / change any previously defined settings of the existing connections or delete them if necessary. The only requirement is to save any of these actions is that you need to click OK after introducing any changes or deleting the connections. To edit or delete server connection, highlight it and then hit Edit or Delete (Fig. 18.).

Backup - Managing server connections.
Fig. 18. Editing / deleting previously defined server connection.

The connection settings can be edited or deleted at any point even though they are used by active jobs. However, it does not affect the active jobs operation as each running job keeps copy of the previously defined server connection. It assures that the job's operation remains uninterrupted even if you delete or change its current server connection settings. Moreover, changes applied to the connections, will only impact jobs once you restart them.

Troubleshooting server connection issues

This section includes the description of the most common issues and their solutions associated with connecting to Office 365 and on-premises Exchange Servers.

This section is divided into two sub-sections:

Troubleshooting Office 365 connection

This sub-section is divided into:

Office 365 connectivity

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

Backup - connection failed
Fig. 19. Problem with establishing connection to Office 365.

Study the examples below that show the most common Office 365 connectivity issues:

  • 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 are incorrect or belongs to the non-administrative user. To fix the problem, make sure to enter the 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 the 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

This test checks if the Administrator, whose email address was entered in the previous step of the wizard, has application impersonation rights. It does so by running the PowerShell command: Get-ManagementRoleAssignment. If the result is negative, the program tries to add such rights for the Administrator.

Backup - impersonation rights step failed
Fig. 20. Problem with verifying the Administrator's impersonation rights.

Study the examples below that show the most common impersonation rights issues:

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

This error might be caused by missing impersonation rights. Wizard tries to grant them automatically, but when it fails, then 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

This test checks remote the PowerShell connectivity to target Office 365. After connecting to the target, the program tries to execute the PowerShell command Get-Mailbox to enumerate all mailboxes.

Backup - enumerating mailboxes failed
Fig. 21. Problem with enumerating mailboxes using PowerShell.
  • 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 the correct credentials.

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

Troubleshooting on-premises Exchange server connection

This sub-section is divided into:

Exchange Server's name vs. Server's IP address

On the server connection step of the connection wizard, you may decide to configure the connection manually. In such a case, you have to use the name of the server instead of its IP. Actually, if you use the IP address of the server (Fig. 22.), the software will not be able to grant you impersonation rights that results in the inability to list the server’s mailboxes.

Backup - IP connection
Fig. 22. Using IP address of the server.

The program will be unable to run any job using such connection, even if you decide to grant the impersonation rights manually. Furthermore, you will receive the following errors in the last step (Fig. 23).

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

Exchange Server's connectivity

This test checks if the program can establish a connection to target on-premises server using the selected Administrator's User Principal Name (an Internal account name of a user in an e-mail address format). The program tries to access this mailbox using EWS (Exchange Web Services) API. Next, it tries to enumerate the mailbox's Inbox folder.

Backup - connection failer
Fig. 24. Problem with establishing connection to on-premises Exchange Server.

Study the examples below that show the most common connectivity issues:

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

The error above indicates that Administrator's credentials entered in the previous step are incorrect or belongs to a non-administrative user. To fix the problem, make sure to enter the correct 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. Go to the previous step of the connection wizard and make sure to enter the correct credentials. Similar message is also shown if the EWS URL is wrong. Go to the first step of the wizard and enter the 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's version that is not supported by the program. Therefore, CodeTwo Backup can be used to backup mailboxes for the following versions of Exchange Servers: 2013 and 2010 SP1 or newer.

  • Invalid URI: The URI 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 activate.

  • 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

This test checks if the Administrator, whose email address was entered in the previous step of the wizard, has application impersonation rights granted. It does so by running the PowerShell command: Get-ManagementRoleAssignment. If the result is negative, the program tries to add such rights for the Administrator.

Backup - impersonation rights step failed
Fig. 25. Problem with verifying the Administrator's impersonation rights.

Study the examples below that show the most common impersonation rights issues:

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

This error might be caused by missing impersonation rights. 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

This test checks the remote PowerShell connectivity to a target Exchange Server. After connecting to the target, the program tries to execute the PowerShell command Get-Mailbox to enumerate all mailboxes.

Backup - enumerating mailboxes failed
Fig. 26. Problem with enumerating mailboxes using PowerShell.
  • 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. Go to the previous step of the connection wizard and make sure to enter the correct credentials.

A similar message is also shown if the EWS URL is wrong. Go to the first step of the wizard and enter the correct EWS URL.

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

See also

Working on multiple servers - how the server connections 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?