Skip to main content
Avalara Help Center

Why am I receiving a "The user or account could not be authenticated. Authentication failed. name=Principal" error when importing a transaction batch through the v2 REST API?

Overview

We are using the v2 REST API to import transaction batches into our Avalara Avatax account. The import saves to the admin console however the error file that is generates shows the following error in the last column:

The user or account could not be authenticated. Authentication failed. name=Principal
 

We have confirmed that we are using a valid account number and license key and that our Authorization header is intact. 

Environment

Avalara Avatax

v2 REST API

Resolution

  • This error will occur if you are using the account number and license key for your authorization header when trying to create a batch.
  • In order to successfully create a batch the v2 REST API requires a valid Username and Password for an admin of the account, as opposed to just the license key and account number.
  • Simply  Base64 encode your credentials {Username:Password} and use the generated token for your authorization header to resolve this error.