Troubleshooting Exchange Online connectivity

When you verify connection settings in the last step of the Exchange connection wizard, CodeTwo Backup registers itself in Microsoft Entra ID (Azure Active Directory) of the tenant to which you are configuring the connection (applies only if you chose the Automatic registration option) and checks the connections to the Microsoft Graph API. If the program fails to perform any of these actions, it will display failure notifications (Fig. 1.).

Failure notifications shown when configuring a connection to Exchange Online.
Fig. 1. Failure notifications shown when configuring a connection to Exchange Online.

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

Troubleshooting application registration

Failed to register 'CodeTwo Backup' with tenant '<TenantID>'.

If you see this error, it means that the account provided in the Application registration step of the connection wizard doesn't have enough permissions to register CodeTwo Backup in your Microsoft Entra ID (Azure Active Directory). Close the Exchange connection wizard, reopen it and use an account with the Global Administrator or Privileged Role Administrator permissions in the Microsoft 365 tenant to which you want to connect.

Keep in mind that even if this step fails, the CodeTwo Backup Exchange entry is created in your Entra ID (Azure AD). However, this application is missing the necessary permissions that only a user with either of the above-mentioned roles can grant. Delete this entry by following these steps or grant the necessary admin consent in the Microsoft Entra admin center and then configure a connection to your Exchange server by following the manual registration path.

Troubleshooting Graph API connectivity

Code: Authorization_RequestDenied Message: Insufficient privileges to complete the operation.

CodeTwo Backup doesn't have the necessary permissions to perform that operation. Make sure to follow these steps in order to grant all the required permissions in your Entra ID (Azure AD).

The wrong application (public or confidential) is being used with this authentication flow.

You will get this error if you enter an incorrect Certificate thumbprint / Client secret (app password) in the Application details step, if that certificate / client secret no longer exists in your Entra ID, or if it has expired.

AADSTS700016: Application with identifier '<Client ID>' was not found in the directory '<Tenant ID>'.

This error occurs if:

  • CodeTwo Backup has been deleted from your Entra ID. If so, make sure to register it again (automatically or manually),
  • you have provided incorrect Client ID and/or Tenant ID in the Application details step of the server connection wizard. Make sure that you have provided correct registration details and try again.
  • the application has just been registered, but not all changes have been propagated in your Entra ID. Wait a while and try configuring the connection again (in the server configuration wizard, click Back, then Next to return to the Configuration step and click Configure).
The SMTP address has no mailbox associated with it.

This error occurs if the email address provided in the Application details step of the server connection wizard is not mailbox-enabled (it is not assigned a Microsoft 365 license that includes the Exchange Online plan). You will also get this message if the provided email address is from a different Microsoft 365 tenant than the one determined by the Tenant ID.

ClientId is not a Guid.

The Client ID entered in the Application details step is not valid. A valid GUID has the following form: 12345678-1234-1234-1234-1234567890AB. Double-check the entered Client ID and try again.

The operation was canceled.

This is a timeout error message that you will receive if the provided Client ID is not identified with any application registered in your Entra ID. Provide the correct ID or check if the application under that ID still exists in the Entra ID. 

Tenant '<Tenant ID'> not found.

Make sure you have entered a correct Tenant ID of your Microsoft 365 tenant. The Tenant ID (or Directory ID) can be found in the Microsoft Entra admin center, as described in this article.

The certificate used must have a key size of at least 2048 bits.

This error appears if you have registered CodeTwo Backup manually in your Entra ID and used a certificate that contains a key that is shorter than 2048 bits. Use a different certificate that uses the necessary key or generate a client secret instead. 

The wrong application (public or confidential) is being used with this authentication flow. 

You will get this error if you enter an incorrect Certificate thumbprint / Client secret (app password) in the Application details step, if that certificate / client secret no longer exists in your Entra ID, or if it has expired.

You can also try the following solutions:

  • synchronize the time on the machine where CodeTwo Backup is installed with a time server,
  • use the Client secret credential instead of Certificate thumbprint if you registered the CodeTwo Backup application in Entra ID manually.

Problem not solved?

If you can't find the solution to your problem, try searching our Knowledge Base.

In this article

Was this information useful?