Skip to content
  • There are no suggestions because the search field is empty.

ErrorUnauthorized - how to fix?

Description of the error code "ErrorUnauthorized"

 

Note: This error code applies to integrations with both Microsoft Exchange Online (Microsoft Graph) and Microsoft Exchange Server (EWS). Where the solution below mentions EWS URLs, service accounts, or the ApplicationImpersonation role, that part applies to Exchange Server. If you see this error on the Microsoft Graph integration and the solution does not resolve it, please submit a support ticket.

Domain: Exchange

Code: ErrorUnauthorized

Type: Configuration error (You are often able to resolve this type of error.)

Description: 

The error can happen in multiple scenarios, please see below

ErrorUnauthorized when connecting the service account (Exchange Server, EWS)

The error can happen when integrating using the service account (Basic authentication)

Possible solutions

Please check that the Exchange version selected is the correct one (Exchange 2013 is not the same as Exchange 2013 with Service Pack 1).

Please make sure that the Service Account is created with a valid mail inbox, as this is used for verification purposes.

Please enter a valid set of credentials. Check that the specified username and password can be used to log in to Exchange. If the error persists, try typing the username without the "@domain.com" in the e-mail field.

You can also check that the username and password can be used to log in to your EWS URL.

Furthermore, you can check if the service account can access EWS externally using the Microsoft Connectivity Tool website. 

ErrorUnauthorized on the Microsoft Graph integration (Exchange Online)

There are no service account credentials to check on the Microsoft Graph integration. Verify that the Microsoft Graph permissions are granted on your integration and, if your organization restricts AskCody's access, that the mailbox is within the allowed scope (click here to learn more about limiting AskCody's access to Microsoft Exchange).

If the error persists, please submit a support ticket.

ErrorUnauthorized in Add-ins/Displays

The integration does not have access to the mailbox/mailboxes added to the meeting. On Exchange Server, the integration is set up with Basic Authentication (username/password). If the integration does not have the correct credentials the add-ins will fail to load with the error message ErrorUnauthorized. Please make sure that the service account credentials are correct by going to Integrations in the Admin Center, press edit, and then update the account without doing any changes to test if the credentials are valid. If the update fails with ErrorUnauthorized Please check the solution presented above. If the update is successful see below.

The service account will try to look-up the meeting room added to the meeting when opening the Add-in. In the case where the service account does not have access to the meeting room mailbox, ErrorUnauthorized will also be shown. Please ensure that the mailbox is within the scope of the service account access.