We’re integrating with a multi-tenant Acumatica (MYOB Advanced) instance. There are two companies (CompanyOne and CompanyTwo). For each tenant, I created a separate Connected App with its own client ID and secret.
Setup:
-
Using OAuth Authorization Code flow
-
Generating an
access_tokenfor each tenant’s Connected App -
Using that token to call the REST API
Issue:
-
REST API calls sometimes return data from the wrong tenant.
-
For example, calling with CompanyOne’s token occasionally still returns data from CompanyTwo.
-
Behavior is inconsistent: if both tokens have expired and I refresh them, tenant separation works correctly for a while, but later the API “sticks” to CompanyTwo again.