Browser-only Single-Page Applications (SPAs) hit hard architectural limits against Workday because Workday supports Cross-Origin Resource Sharing (CORS) exclusively on Workday REST APIs (Register API Client with Authorization Code Grant and PKCE), and never on Reports-as-a-Service (RaaS) or Workday Web Services (SOAP). Placing a thin, stateless Backend-for-Frontend (BFF) pass-through edge between the browser and Workday eliminates preflight failures across REST, WQL, RaaS, and SOAP while keeping OAuth credentials out of browser JavaScript (localStorage / sessionStorage).
Frontend engineers often start an internal Workday portal by calling GET /common/v1/workers/me directly from React or Vue after adding Allowed Origins on Register API Client. Everything appears to work in Day 1 testing—until the screen needs a custom RaaS report column, a SOAP transaction, or secure refresh rotation without exposing credentials to cross-site scripting (XSS).
Which Workday Endpoints Allow Browser CORS Calls (and Which Block Them)
When a browser page hosted on https://portal.company.example sends an authenticated fetch() request with an Authorization: Bearer ... header to a Workday host, the browser automatically fires an OPTIONS preflight request first (Access-Control-Request-Headers: authorization, content-type). Unless Workday responds with Access-Control-Allow-Origin: https://portal.company.example, the browser aborts the call before reading a single byte.
Compare Workday’s actual preflight behavior across every API surface:
| Workday Endpoint Family | Path Pattern | Direct Browser CORS Support | Why Direct SPA Calls Succeed or Fail |
|---|---|---|---|
Workday Endpoint FamilyWorkday REST APIs (common, staffing, absenceManagement, timeTracking, businessProcess) |
Path Pattern/ccx/api/{service}/{version}/{tenant}/... or regional WCP gateway |
Direct Browser CORS SupportSupported (requires PKCE + Allowed Origins) |
Why Direct SPA Calls Succeed or FailSucceeds only when the origin is listed in Allowed Origins on Register API Client with Authorization Code Grant + PKCE. |
| Workday Endpoint FamilyWorkday Query Language (WQL) | Path Pattern/ccx/api/wql/v1/{tenant}/data |
Direct Browser CORS SupportSupported (as part of REST API gateway) | Why Direct SPA Calls Succeed or FailSubject to same Allowed Origins rules; queries over 2,048 characters require POST /data (Content-Type: application/json), triggering preflight. |
| Workday Endpoint FamilyReports-as-a-Service (RaaS) | Path Pattern/ccx/service/customreport2/{tenant}/{owner}/{report}?format=json |
Direct Browser CORS SupportNot Supported | Why Direct SPA Calls Succeed or FailWorkday explicitly does not emit CORS headers on RaaS endpoints. Every direct browser fetch() fails CORS preflight immediately. |
| Workday Endpoint FamilyWorkday Web Services (SOAP) | Path Pattern/ccx/service/{tenant}/{Service_Name}/{version} |
Direct Browser CORS SupportNot Supported | Why Direct SPA Calls Succeed or FailWorkday does not support CORS on SOAP XML endpoints (Human_Resources, Absence_Management, Benefits_Administration, etc.). |
| Workday Endpoint FamilyOAuth 2.0 Confidential Exchange | Path Pattern/ccx/oauth2/{tenant}/token (with Client Secret) |
Direct Browser CORS SupportUnsafe from Browser | Why Direct SPA Calls Succeed or FailSending a confidential Client Secret in HTTP Authorization: Basic from browser JS leaks the secret to every user’s DevTools network tab. |
How Workday’s Allowed Origins Configuration Works (and Its Exact Rules)
If your application genuinely calls only Workday REST endpoints from a public browser client using Authorization Code Grant with PKCE (step-by-step OAuth PKCE guide), verify two tenant settings:
- Tenant OAuth Switch (
Edit Tenant Setup - Security): Confirm OAuth 2.0 Clients Enabled is checked under OAuth 2.0 Settings. - Client
Allowed Origins(Register API Client/Edit API Client):- Client Grant Type must be
Authorization Code Grant. - Support Proof Key for Code Exchange (PKCE) must be checked.
- Add each exact requesting origin to the Allowed Origins grid (or Authorized CORS Domains on Developer Console clients) using strict
protocol://domainorprotocol://domain:portsyntax.
- Client Grant Type must be
Watch out for the four formatting mistakes that cause Workday REST preflights to fail even after editing Allowed Origins:
Valid Allowed Origins entries:
https://portal.company.example
https://localhost:5173
Invalid entries (will not match browser Origin header):
https://portal.company.example/ <-- Trailing slash breaks exact origin match
https://portal.company.example/app <-- Path segments never appear in an HTTP Origin header
https://*.company.example <-- Wildcard subdomains are rejected
http://portal.company.example <-- Scheme mismatch when page loads over https://Four Reasons Pure-Browser SPAs Still Break Beyond REST CORS
Even when Allowed Origins is formatted cleanly for REST, pure-browser SPAs run into four structural roadblocks in production Workday rollouts:
1. The RaaS and SOAP Wall
Virtually every non-trivial Workday employee or manager portal eventually needs either:
- A RaaS custom report exposing tenant-specific calculated fields (for example, local statutory leave balances or custom benefit deduction summaries), or
- A SOAP web service (
Get_WorkerswithInclude_Benefit_Enrollments,Get_Time_Off_Plan_Balances, or long-tail HR/Payroll actions; see calling Workday SOAP with user-delegated Bearer credentials).
Because Workday never returns CORS headers on /ccx/service/customreport2/... or /ccx/service/{tenant}/..., a pure-browser SPA hits an immediate dead end the first time HRIS asks for data outside the REST catalog.
2. Confidential vs. Public Client Credentials
When Register API Client generates a Client ID and Client Secret, passing that secret from a browser bundle exposes it publicly. If an attacker extracts your client credentials and pairs them with a phished or open redirect, your OAuth boundary weakens (diagnosing OAuth client and redirect URI errors). Keeping the /ccx/oauth2/{tenant}/token code exchange and refresh grant on a server-side edge keeps the Client Secret inside a locked server secret store.
3. Browser localStorage Exposure of Worker HR Bearers
A pure-browser SPA must hold the employee’s active Bearer credential and refresh value somewhere accessible to JavaScript (memory, sessionStorage, or localStorage). Any third-party script vulnerability or XSS vector on that origin can exfiltrate the worker’s live Workday Bearer credential and query common/v1/workers/me/paySlips or personal contact endpoints until expiry (how Workday refresh expiration and revocation work).
4. Enterprise Network Split-Horizon & IP Allowlists
Many enterprises restrict Workday API traffic via Maintain IP Ranges and Manage Authentication Policies so API calls are accepted only from approved corporate egress IPs. Employee laptops and personal mobile browsers roam across home Wi-Fi, cellular carriers, and hotel networks—making direct browser-to-Workday API calls fail authentication policy IP checks whenever a worker is off VPN.
The Clean Fix: A Stateless Backend Pass-Through Edge (BFF)
You do not need a caching database or a shared Integration System User to solve browser CORS and token storage. A stateless Backend-for-Frontend (BFF) pass-through gives you same-origin browser calls, full RaaS/SOAP reach, and zero HR data at rest:
# Browser calls its OWN same-origin pass-through endpoint (zero CORS preflight):
GET /api/workday/hub-summary HTTP/1.1
Host: portal.company.example
Cookie: __Host-wd_session=<AES-256-GCM_sealed_employee_oauth_bundle>
Accept: application/jsonInside the stateless pass-through handler, the server:
- Unseals in RAM only: Decrypts
__Host-wd_session(Secure; HttpOnly; SameSite=Lax) in memory using an server-held AES-256-GCM key—zero Redis or SQL session tables storing worker credentials. - Calls REST, WQL, RaaS, and SOAP server-to-server: Because server-to-server HTTP does not use browser CORS, the edge can call
/ccx/api/absenceManagement/v5/...,/ccx/api/wql/v1/...,/ccx/service/customreport2/..., and/ccx/service/{tenant}/Human_Resources/...in parallel using the signed-in employee’s Bearer credential. - Rotates Refresh Grants Safely: If the short-lived Bearer credential expired, the server calls
/ccx/oauth2/{tenant}/tokenusing the confidential Client Secret from its vault, re-seals the rotated bundle into an updatedSet-Cookieheader, and retries automatically. - Streams
Cache-Control: private, no-store: Returns only the fields the UI component renders and discards the raw Workday payload from RAM immediately.
Verification Checklist Before Production Cutover
- Confirm Zero Credentials in Frontend Bundles: Inspect browser
localStorage,sessionStorage, and JavaScript network payloads in DevTools to verify that neither the Workday Client Secret nor raw Workday Bearer strings are readable by client-side scripts. - Test a RaaS and REST Call Together as
Employee As Self: Sign in as a standard employee without admin domains and verify both REST (/workers/me) and RaaS (customreport2) return200 OKthrough the same-origin pass-through without browser console CORS errors. - Enforce
Cache-Control: private, no-store: Verify every pass-through response carriesCache-Control: private, no-storeso corporate proxies, CDNs, and shared computers never persist worker JSON.
For teams that want custom browser, workplace chat, and mobile Workday screens without building and operating their own stateless BFF infrastructure, Kiweely Leaf (coming next) provides a hosted stateless pass-through UI layer out of the box—running every REST, WQL, RaaS, and SOAP call under each signed-in worker’s own Workday OAuth session with zero HR data stored at rest.
Frequently asked questions
Does Workday support CORS on Reports-as-a-Service (RaaS) or SOAP Web Services?
No. Workday explicitly supports CORS on Workday REST API requests only (configured via the Allowed Origins table on Register API Client for Authorization Code with PKCE). Browser fetch() or XMLHttpRequest calls directly to SOAP or RaaS endpoints fail preflight checks because Workday omits Access-Control-Allow-Origin headers on those services.
Where do you configure CORS Allowed Origins for a Workday REST API client?
Open Register API Client (or Edit API Client via View API Clients), ensure Client Grant Type is Authorization Code Grant with Support Proof Key for Code Exchange (PKCE) enabled, and add each exact browser origin (scheme, hostname, and optional port, with no trailing path) to the Allowed Origins table.
Why shouldn't a React or Vue single-page app embed a Workday Client Secret in frontend JavaScript?
Any credential compiled into browser JavaScript bundles can be extracted by anyone opening DevTools. Confidential client credentials belong strictly on a server-side or edge pass-through component, never in public browser code.
Does a backend-for-frontend (BFF) pass-through require storing Workday HR data in a database?
No. A stateless pass-through edge exchanges OAuth codes in memory, seals user credentials in encrypted HttpOnly cookies, forwards REST, WQL, RaaS, and SOAP calls live under the signed-in employee's Bearer credential, and discards responses immediately after streaming.