OAuth 2.0 Token Exchange Failing with 401 for Multi-Tenant AppFoundry Deployments

Looking for advice on handling 401 Unauthorized errors during the OAuth 2.0 token exchange flow for our multi-tenant AppFoundry integration. The issue occurs when refreshing access tokens for partner organizations.

  1. Initial authorization code grant succeeds.
  2. Refresh token request to /v2/oauth/token returns 401.
  3. Audit logs show invalid_grant.

Is there a known limitation with refresh token lifespan in multi-org setups? Using SDK v4.2.1.