---
title: "Fix 401 Unauthorized errors despite valid token"
description: "Are you getting a 401 Unauthorized error despite having a valid Access Token? Read more about how to solve this frequently asked question."
lang: en
languages:
  en: https://docs.vismasoftware.no/vismanetapi/how-tos/fix401error/index.md
lastmod: 2026-05-18
---

> Documentation index: https://docs.vismasoftware.no/vismanetapi/how-tos/fix401error/llms.txt


# Fix 401 Unauthorized errors despite valid token

Last modified May 18, 2026

> Are you getting a 401 Unauthorized error despite having a valid Access Token? Read more about how to solve this frequently asked question.


## Overview

This usually happens when the wrong Tenant Id is used during App Store setup. When connecting applications using an invitation code, make sure to select the **Company Tenant ID** as the organization, not the **Customer Tenant ID**. Both will let you authenticate through Visma Connect, but using the customer tenantId will return a 401 Unauthorized when sending requests to the Visma Net APIs.

This is easy to mix up when the **Customer** and **Company** share the same name.

To find the correct tenantId, go to → [Visma Admin](https://admin-user-access.visma.net/) → Company → Select the company → Edit → Configuration → Tenant id.

![Admin](https://docs.vismasoftware.no/vismanetapi/how-tos/fix401error/admintenant.png)

Make sure this Tenant ID from Visma Admin matches the one in the App Store before using the invitation code.

![App Store](https://docs.vismasoftware.no/vismanetapi/how-tos/fix401error/appstore.png)

If it does not match, use the **"Change organization"** dropdown menu to select the organization whose Tenant ID matches.

---

[View this page](https://docs.vismasoftware.no/vismanetapi/how-tos/fix401error/)


## In this section

