Skip to content
KiweelyKiweelyKiweely

How to Enable WQL in a Workday Tenant: Security Domains, API Client Scopes, and Verification

Enabling Workday Query Language (WQL) in a Workday tenant takes three pieces: Report/Task permissions on the Workday Query Language domain, a registered API client with the System functional area scope, and activating pending security policy changes.

  • Checked against Workday on
  • Applies to Workday Extend
  • 5 min read
  • Published
  • By Kiweely
On this page

Enabling Workday Query Language (WQL) in a Workday tenant requires granting Report/Task permissions on the Workday Query Language security domain in the System functional area, registering an API client with the System functional area scope, and running Activate Pending Security Policy Changes. WQL is not turned on by a global tenant switch; access is controlled entirely by configurable security policies and OAuth 2.0 client scopes.

Before starting, confirm whether WQL will run from an external system (middleware, scripts, or an external service) or inside a native Workday Extend or Orchestration app. External callers need an OAuth 2.0 API client in the tenant; native Extend and Orchestration apps do not.

Choose the Right API Client Task

Workday provides two tasks for registering OAuth 2.0 API clients, and picking the wrong one causes avoidable token failures later:

Task Intended Use Authentication Context Token Lifecycle
TaskRegister API Client for Integrations Intended UseExternal backend services, scripts, and scheduled integrations Authentication ContextBound to an Integration System User (ISU) or service account via refresh token Token LifecycleSupports Non-Expiring Refresh Tokens for unattended runs
TaskRegister API Client Intended UseInteractive web applications acting on behalf of a signed-in human user Authentication ContextAuthorization Code Grant or SAML Bearer Grant tied to the logged-in user Token LifecycleTied to the end user’s session and account lifecycle

For most external WQL integrations, use Register API Client for Integrations paired with a dedicated ISU.

Step-by-Step Tenant Setup

  1. Create or select the executing account and security group. Run Create Integration System User (or pick an existing ISU that is authorized to run reports) and attach it to a dedicated security group using Create Security Group (such as an Integration System Security Group). Avoid tying unattended WQL integrations to a human employee account.

  2. Grant access to the Workday Query Language security domain. Run Domain Security Policies for Functional Area and select System in the Functional Area prompt. Locate the Workday Query Language domain, open its related actions, and choose Domain Security Policy > Edit Permissions. Under Report/Task Permissions, add your security group and select:

    • View to allow GET /dataSources, GET /dataSources/{ID}, and GET /data requests.
    • Modify if your integration will call POST /data (required for queries between 2,048 and 16,000 characters).

    Do not put the security group in Integration Permissions alone. Workday’s REST API security model checks Report/Task Permissions for both ISUs and individual users; Integration Permissions apply only to Workday SOAP web services.

  3. Grant security on the target data sources and fields. Access to the Workday Query Language domain only unlocks the WQL service itself. WQL strictly enforces Workday’s configurable security model: the executing account can only see data sources, filters, business objects, and fields its security group already has permission to view. Add the relevant reporting and data domains to the same security group.

  4. Activate pending security policy changes. Run Activate Pending Security Policy Changes, enter a comment, and confirm on the next screen. Until this task completes, every edit from steps 2 and 3 remains inactive.

  5. Register the API client with the System scope. Run Register API Client for Integrations (or Register API Client for interactive user apps). Enter a Client Name, enable Non-Expiring Refresh Tokens if the integration runs unattended, and add System under Scope (Functional Areas). Save the generated Client ID and Client Secret immediately.

  6. Generate a refresh token for the ISU. Run View API Clients, locate your new client, open its related actions menu, and select API Client > Manage Refresh Tokens for Integrations. Select your ISU in Workday Account, check Generate New Refresh Token, and click OK. Copy the refresh token from the confirmation page because Workday displays it only once. From View API Clients, also record the Token Endpoint and Workday REST API Endpoint for your tenant.

Security Checklist and Common 401/403 Symptoms

When a WQL call fails after setup, the failure almost always maps to one specific layer:

Layer Exact Setting Required Common 401/403 Symptom if Missed
LayerOAuth Token Exchange Exact Setting RequiredValid Client ID, Client Secret, and active refresh token issued to the ISU at the tenant Token Endpoint Common 401/403 Symptom if Missed401 Unauthorized or invalid_grant when requesting a bearer access token
LayerAPI Client Scope Exact Setting RequiredSystem selected in Scope (Functional Areas) on the registered API client Common 401/403 Symptom if Missed403 Forbidden (insufficient scope) on /dataSources and /data even when the ISU has domain access
LayerWQL Domain Policy Exact Setting RequiredSecurity group added to Report/Task Permissions (View for GET, Modify for POST) on Workday Query Language Common 401/403 Symptom if Missed403 Forbidden when hitting /dataSources or /data, especially if only Integration Permissions were granted
LayerPolicy Activation Exact Setting RequiredActivate Pending Security Policy Changes completed after editing domain policies Common 401/403 Symptom if Missed403 Forbidden persists despite the domain policy screen showing the security group
LayerData-Source & Field Domains Exact Setting RequiredExecuting ISU’s security group granted access to the underlying report data sources and business object fields Common 401/403 Symptom if Missed200 OK with missing data sources in /dataSources, empty rows, or field-level authorization errors in /data

Verify WQL Access with curl

First exchange your refresh token at the tenant’s Token Endpoint (shown on View API Clients) to obtain a short-lived OAuth 2.0 bearer access token. Then verify WQL service access against your tenanted host (https://<tenant-host>/ccx/api/wql/v1/<tenant>) or the Workday Cloud Platform API Gateway (https://api.workday.com/wql/v1).

Start with GET /dataSources to confirm the API client scope and Workday Query Language domain are active:

bash
curl -sS \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  "https://<tenant-host>/ccx/api/wql/v1/<tenant>/dataSources?limit=5"

A 200 OK JSON response containing a total count and a data array of data source descriptors confirms WQL is enabled for the account.

Next, run a short query (under 2,048 characters) with GET /data:

bash
curl -sS -G \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  --data-urlencode "query=SELECT location, count(workers) FROM allWorkers GROUP BY location" \
  "https://<tenant-host>/ccx/api/wql/v1/<tenant>/data"

Workday caches WQL query results for 30 minutes; append offset=0 to the query parameters if you need to bypass the cache during testing.

For longer queries (between 2,048 and 16,000 characters), send the query in a JSON body with POST /data:

bash
curl -sS -X POST \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"query":"SELECT location, max(yearsOfService) FROM allWorkers GROUP BY location"}' \
  "https://<tenant-host>/ccx/api/wql/v1/<tenant>/data"

If GET /data succeeds but POST /data returns 403 Forbidden, verify that the security group has Modify (not just View) under Report/Task Permissions on the Workday Query Language domain and re-run Activate Pending Security Policy Changes.

Frequently asked questions

Why does WQL return 403 Forbidden even after granting Integration Permissions on the Workday Query Language domain?

Workday REST APIs, including WQL, check Report/Task Permissions rather than Integration Permissions. Integration Permissions apply only to Workday SOAP web services. Grant View (and Modify if calling POST /data) under Report/Task Permissions, then run Activate Pending Security Policy Changes.

Do I need to register an API client to run WQL inside a Workday Extend or Orchestration app?

No. Workday documents that you only need to register a tenant API client when calling WQL from an external system. Native Workday Extend and Orchestration apps execute WQL without a separate tenant API client registration, though the executing security context still needs access to the Workday Query Language domain and target data.

Why does GET /dataSources succeed while my SELECT query returns empty results or permission errors?

Access to the Workday Query Language domain only lets an account call the WQL service. WQL enforces Workday's standard configurable security model, so the Integration System User or user account must also hold domain permissions for every data source, business object, and field referenced in the query.

Sources checked

Run WQL against your real tenant.

Kiweely Vine inspects your tenant's data sources and fields, runs the query under your Workday security, and verifies the rows returned.

Get the next guide in your inbox.

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

We’ll email you once to confirm. Unsubscribe in one click from any issue.

Protected by reCAPTCHA. Google’s privacy policy and terms apply.