Let me provide a complete solution that addresses all three critical areas: OAuth2 scope configuration, multi-tenant token validation, and API gateway requirements.
OAuth2 Scope and Claims Setup:
Your integration system needs these specific scopes in the security configuration:
- Financial_Accounting (base scope)
- Intercompany_Accounting (cross-company operations)
- Multi_Company_API_Access (critical for R1 2023)
In Domain Security Policies, enable “Allow API Access Across Multiple Companies” for your integration system.
Multi-Tenant Token Validation:
Modify your token request to include all companies:
POST /oauth2/token
company_scope=US_ENTITY,EMEA_ENTITY
grant_type=client_credentials
This generates a token with proper audience claims for both tenants. The key is the company_scope parameter - without it, you get a single-tenant token that fails validation.
API Gateway Header Requirements:
Your journal entry POST must include:
POST /financials/v1/journalEntries
Authorization: Bearer {multi_tenant_token}
Workday-Company-Context: US_ENTITY,EMEA_ENTITY
Content-Type: application/json
The Workday-Company-Context header (not X-Workday-Tenant-Context - that’s deprecated) tells the gateway which companies to validate against. Without this header, the gateway can’t match your token’s audience claims to the transaction companies.
Additional Configuration:
In your integration system security group, verify:
- “View” and “Modify” permissions for Journal Entries in BOTH companies
- “Intercompany Accounting” functional area is enabled
- API gateway timeout is set to at least 60 seconds (intercompany validation takes longer)
After making these changes, regenerate your OAuth2 token. The 401 error should resolve. If you still see issues, check the Workday API logs (Setup > Integration > System > View Integration Events) for detailed validation failure messages. The logs will show exactly which claim or permission is missing.
One final note: if you’re using a reverse proxy or API management layer in front of Workday, ensure it’s not stripping the Workday-Company-Context header. We’ve seen several implementations where the proxy configuration removed custom headers, causing this exact authentication failure.
This draft is based on general Workday knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.