---
title: "Workday CORS & Browser API Limits: Pass-Through Fix"
description: "Why browser single-page apps fail on Workday SOAP and RaaS CORS blocks, Allowed Origins rules, and Client Secret exposure—and how a stateless BFF fixes it."
url: https://kiweely.com/guides/workday-cors-browser-api-calls-why-backend-pass-through-needed
---

# Why Browser Single-Page Apps Hit CORS and Token Limits Against Workday APIs—and How to Fix It

Workday supports CORS only on Workday REST APIs for Authorization Code with PKCE clients—never on SOAP or Reports-as-a-Service (RaaS). Placing a stateless backend pass-through edge in front of Workday keeps Client Secrets off browsers and unifies REST, WQL, RaaS, and SOAP.

-   **Checked** against Workday on November 15
-   Applies to **Workday APIs & OAuth**
-   6 min read
-   Published November 15
-   By Kiweely

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 REST APIs** (`common`, `staffing`, `absenceManagement`, `timeTracking`, `businessProcess`) | `/ccx/api/{service}/{version}/{tenant}/...` or regional WCP gateway |  **Supported** (requires PKCE + `Allowed Origins`) | Succeeds *only* when the origin is listed in **Allowed Origins** on **Register API Client** with **Authorization Code Grant** + **PKCE**. |
|  **Workday Query Language (WQL)** | `/ccx/api/wql/v1/{tenant}/data` |  **Supported** (as part of REST API gateway) | Subject to same **Allowed Origins** rules; queries over 2,048 characters require `POST /data` (`Content-Type: application/json`), triggering preflight. |
|  **Reports-as-a-Service (RaaS)** | `/ccx/service/customreport2/{tenant}/{owner}/{report}?format=json` |  **Not Supported** | Workday explicitly does **not** emit CORS headers on RaaS endpoints. Every direct browser `fetch()` fails CORS preflight immediately. |
|  **Workday Web Services (SOAP)** | `/ccx/service/{tenant}/{Service_Name}/{version}` |  **Not Supported** | Workday does **not** support CORS on SOAP XML endpoints (`Human_Resources`, `Absence_Management`, `Benefits_Administration`, etc.). |
|  **OAuth 2.0 Confidential Exchange** | `/ccx/oauth2/{tenant}/token` (with Client Secret) |  **Unsafe from Browser** | Sending 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](https://kiweely.com/guides/workday-authorization-code-grant-user-delegated-oauth-setup)), verify two tenant settings:

1.  **Tenant OAuth Switch (`Edit Tenant Setup - Security`):** Confirm **OAuth 2.0 Clients Enabled** is checked under **OAuth 2.0 Settings**.
2.  **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://domain` or `protocol://domain:port` syntax.

Watch out for the four formatting mistakes that cause Workday REST preflights to fail even after editing **Allowed Origins**:

text

```
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_Workers` with `Include_Benefit_Enrollments`, `Get_Time_Off_Plan_Balances`, or long-tail HR/Payroll actions; see [calling Workday SOAP with user-delegated Bearer credentials](https://kiweely.com/guides/workday-soap-api-bearer-token-user-delegated-oauth)).

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](https://kiweely.com/guides/workday-oauth-invalid-client-unauthorized-client-redirect-uri)). 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](https://kiweely.com/guides/workday-oauth-refresh-token-expiration-rotation-revocation)).

### 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:

Works

```
# 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/json
```

Inside the stateless pass-through handler, the server:

1.  **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.
2.  **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.
3.  **Rotates Refresh Grants Safely:** If the short-lived Bearer credential expired, the server calls `/ccx/oauth2/{tenant}/token` using the confidential Client Secret from its vault, re-seals the rotated bundle into an updated `Set-Cookie` header, and retries automatically.
4.  **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

1.  **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.
2.  **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`) return `200 OK` through the same-origin pass-through without browser console CORS errors.
3.  **Enforce `Cache-Control: private, no-store`:** Verify every pass-through response carries `Cache-Control: private, no-store` so 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](https://kiweely.com/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.

## Sources checked

-   [Workday Admin Guide — Reference: Edit Tenant Setup - Security](https://doc.workday.com/admin-guide/en-us/manage-workday/tenant-configuration/tenant-setup/dan1370796470031.html)
-   [Workday Admin Guide — Reference: WQL REST API](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/srr1614364076622.html)
-   [Workday Developer Site — REST API Explorer & CORS Fundamentals](https://developer.workday.com/rest-api-explorer)

## Related guides

[All guides](https://kiweely.com/guides)

-   [### Authenticating Workday SOAP Web Services with a User-Delegated OAuth Bearer Token Send Workday SOAP requests with an HTTP Authorization Bearer header issued from a user-delegated OAuth 2.0 Authorization Code grant and leave the SOAP XML Header element empty. Workday evaluates both the API Client Functional Area scope and the signed-in worker’s Integration Permissions.](https://kiweely.com/guides/workday-soap-api-bearer-token-user-delegated-oauth)
-   [### Managing Workday OAuth Refresh Token Expiration, Rotation, and Revocation Workday rotates user-delegated OAuth refresh tokens on every exchange while enforcing a fixed absolute Refresh Token Timeout measured from initial sign-in. Learn how access TTLs, Enforce 60 Minute Access Token Expiry, and admin revocation tasks work.](https://kiweely.com/guides/workday-oauth-refresh-token-expiration-rotation-revocation)
-   [### Fixing Workday OAuth invalid\_client, unauthorized\_client, and Redirect URI Errors Resolve Workday OAuth 2.0 handshake errors by matching each exact HTTP error code—invalid\_client, unauthorized\_client, invalid\_grant, and redirect\_uri mismatch—against your View API Clients settings, tenant endpoint URLs, and PKCE S256 verifier.](https://kiweely.com/guides/workday-oauth-invalid-client-unauthorized-client-redirect-uri)
-   [### How to Configure User-Delegated OAuth 2.0 Authorization Code Grant in Workday Register a user-delegated Workday OAuth 2.0 client using Register API Client with Authorization Code Grant, PKCE (S256), and Bearer credentials so external applications authenticate employees through SSO and run under their own Workday permissions.](https://kiweely.com/guides/workday-authorization-code-grant-user-delegated-oauth-setup)

### More guides on Integrations and APIs

[All 89 guides](https://kiweely.com/guides#integrations)

-   [Parsing Workday Business Process Custom Validation Errors Returned by REST and SOAP APIs](https://kiweely.com/guides/workday-business-process-validation-errors-rest-soap-responses)
-   [How Workday Audits Business Processes Initiated via REST or SOAP Web Services](https://kiweely.com/guides/workday-business-process-audit-trail-initiated-via-web-service)
-   [Approving, Denying, and Sending Back Workday Business Process Steps via REST and SOAP APIs](https://kiweely.com/guides/workday-business-process-approve-deny-rest-soap-api)
-   [How Workday Studio PutIntegrationMessage Severity Levels Control Completed-with-Warnings vs. Aborted Runs](https://kiweely.com/guides/workday-studio-error-severity-critical-warning-abort)
-   [How to Fix Workday Studio SDKProfile Not Current and Unsigned Software Startup Errors on Mac and Windows](https://kiweely.com/guides/workday-studio-sdkprofile-not-current-unsigned-macos-errors)
-   [How to Authenticate Workday Studio and External Tools Using an OAuth API Client with PKCE (When SSO Blocks Passwords)](https://kiweely.com/guides/workday-api-client-pkce-sso-without-workday-password)
-   [Workday PECI vs. PICOF Payroll Connectors: How Effective-Dated Stack and Retro Changes Export](https://kiweely.com/guides/workday-peci-picof-payroll-connector-change-detection)
-   [Why does my Workday Accounting Journal EIB fail? Balancing, worktag and period errors](https://kiweely.com/guides/workday-financials-accounting-journal-eib-validation-errors)

### From the blog on Integrations and APIs

[All posts](https://kiweely.com/blog)

-   [Why Shared Integration System Users (ISUs) Are a Security Risk for Employee AI Chatbots](https://kiweely.com/blog/why-integration-system-users-are-dangerous-for-workday-ai)
-   [Mapping Microsoft Teams, Slack, DingTalk, and Lark Identities to Workday Worker OAuth](https://kiweely.com/blog/mapping-teams-slack-lark-sso-identities-to-workday-workers)
-   [How Workday’s Twice-Yearly Releases Break In-House MCP Servers and REST Integrations](https://kiweely.com/blog/how-workday-twice-yearly-releases-break-custom-mcp-servers)

## Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.
