Visma.net raises error (using VNI)

I am trying to create a new database with the Visma connect approach, but after I sign on I get an error message saying “Data access requires an active OAuth access token. A new access token could not be acquired when exchanging the OAuth refresh token.” I can’t find anything on this in the forum. Does anyone know what causes this error message and how I can solve it?

I have a VNI connection up and running, but after I added a second company to my visma user it fails to load data du to a “can not convert to number” error.

Power BI:

Error: undefinedErrorMessage=Encountered user gateway exception: 'Vi kan ikke konvertere til tall.
DM_ErrorDetailNameCode_UnderlyingErrorCode=-2147467259
DM_ErrorDetailNameCode_UnderlyingErrorMessage=Vi kan ikke konvertere til tall.
DM_ErrorDetailNameCode_UnderlyingHResult=-2147467259
Microsoft.Data.Mashup.ValueError.Detail=4000AA
Microsoft.Data.Mashup.ValueError.Reason=DataFormat.Error
InnerType=MashupValueException
Vi kan ikke konvertere til tall.
GatewayPipelineErrorCode=DM_GWPipeline_Gateway_MashupDataAccessError
ErrorShortName=GatewayClientErrorResponseException
ExceptionErrorShortName=GatewayClientErrorResponseException

The following errors can be found:

itgenscr345
Data container not set while choosing existing OAuth.

and (#89771982):

itgenoda061
Datatilgang krever et aktivt OAuth-tilgangstoken.
Et nytt tilgangstoken kunne ikke anskaffes ved utveksling av OAuth-oppdateringstokenet.
The remote server returned an error: (400) Bad Request.
https://connect.visma.com/connect/token

To be sure: did you add:

A. another company (with separate branches) or
B. a branch to an existing company?

The following company numbers can be seen on Visma.net 1875374: 886082 (long name + “AS”) and 1875374 (short name + “AS”) since at least May 2, 2024.

Please note that when using Visma Connect each company needs a different datacontainer. Visma has removed the multi-company support when moving from VNI to Visma Connect. VNI will be deprecated in the course of this year.

See Migrating from Visma.net ERP Integrations (VNI) to Visma Connect for Visma.net

Alternative A: another company was added. To different company numbers:

886082 and 1875374

When I try to add a new Visma Connect database i get the choice of the two different companies.

I get the same oauth token error on both

With VNI it should be possible to have two companies. With Visma Connect you should be able to choose exactly one and then connect, butwithout error.

We will reach out through a different channel to get privileges to access your environment.

1 like

We have tried to diagnose the issue. The problem does indeed occur, but it is unknown why. The Visma Connect API returns a invalid_tenant error, without further context.

On the same app it is possible to log on using another Visma account without issues. An error occurs on both VNI and Visma Connect. The user is an Integration Administrator and should thus be able to log on.

We have forwarded this issue to Visma in order to get a clearer error message and a solution to the problem at hand.

One of the channels used is the Visma developer forum: Visma Connect: invalid_tenant on exchanging author... - Visma Community.

Visma has registered the issue under case number 00070892. This topic will be updated when an answer is received.

Can you please check if the user has the API user role?

The API user role was not given to the user. Everything work fine now

Wonderful. We have requested Visma to change the error message in something meaningful.

For reference, please note that the steps for registration are listed on:

To be sure: the API user role was missing in one company or everywhere?

The API User role was missing for my user in one company. I just added all available roles to my user, as I am the company admin anyway.

Another error code, itgenvnt059, is now returned in the case of the invalid_tenant error response to improve traceability.

Dit topic is 3 dagen na het laatste antwoord automatisch gesloten. Nieuwe antwoorden zijn niet meer toegestaan.