---
title: "Enable WQL in a Workday Tenant: Security & API Setup"
description: "Configure the Workday Query Language security domain, System API client scope, and pending security activation, then verify WQL REST access."
url: https://kiweely.com/guides/workday-enable-wql-tenant-security-domains-setup
---

# 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 December 5
-   Applies to **Workday Extend**
-   5 min read
-   Published December 5
-   By Kiweely

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 |
| --- | --- | --- | --- |
|  **Register API Client for Integrations** | External backend services, scripts, and scheduled integrations | Bound to an Integration System User (ISU) or service account via refresh token | Supports **Non-Expiring Refresh Tokens** for unattended runs |
|  **Register API Client** | Interactive web applications acting on behalf of a signed-in human user | Authorization Code Grant or SAML Bearer Grant tied to the logged-in user | Tied 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 |
| --- | --- | --- |
|  **OAuth Token Exchange** | Valid Client ID, Client Secret, and active refresh token issued to the ISU at the tenant **Token Endpoint** | `401 Unauthorized` or `invalid_grant` when requesting a bearer access token |
|  **API Client Scope** |  **System** selected in **Scope (Functional Areas)** on the registered API client | `403 Forbidden` (insufficient scope) on `/dataSources` and `/data` even when the ISU has domain access |
|  **WQL Domain Policy** | Security group added to **Report/Task Permissions** (**View** for `GET`, **Modify** for `POST`) on **Workday Query Language** | `403 Forbidden` when hitting `/dataSources` or `/data`, especially if only **Integration Permissions** were granted |
|  **Policy Activation** |  **Activate Pending Security Policy Changes** completed after editing domain policies | `403 Forbidden` persists despite the domain policy screen showing the security group |
|  **Data-Source & Field Domains** | Executing ISU’s security group granted access to the underlying report data sources and business object fields | `200 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

-   [Concept: Workday Query Language (WQL)](https://developer.workday.com/documentation/GUID-6546152a-bcf0-447d-8d64-230f9e2ac291-enHYPHENus/ConceptWorkdayQueryLanguageWQL)
-   [Reference: WQL REST API](https://developer.workday.com/documentation/GUID-5c940864-7651-4e28-a9d2-79b45292e66a-enHYPHENus/ReferenceWQLRESTAPI)
-   [Concept: Workday REST API Security](https://developer.workday.com/documentation/dan1370797986071/ConceptWorkdayRESTAPISecurity)
-   [Workday Administrator Guide: Workday Query Language (WQL)](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/aht1611188422513.html)

## Related guides

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

### More guides on WQL

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

-   [Workday WQL vs SQL: Syntax, WHERE Operators, and Limitations](https://kiweely.com/guides/workday-wql-vs-sql-syntax-differences-limitations)
-   [Workday WQL WHERE Syntax: = Equality, OR Logic, and lastFunctionallyUpdated](https://kiweely.com/guides/workday-wql-lastfunctionallyupdated-or-filter-syntax)
-   [Workday WQL Alias Naming Rules and Restrictions](https://kiweely.com/guides/workday-wql-alias-naming-rules-and-restrictions)
-   [Fix Workday WQL ExternalFieldException: Convert Currency Field Did Not Find a Currency Conversion Rate](https://kiweely.com/guides/workday-wql-convert-currency-external-field-exception)
-   [Does Workday WQL Support SELECT \*? How to List Data Source Fields](https://kiweely.com/guides/workday-wql-select-star-wildcard)
-   [Workday to Snowflake and Databricks: Comparing Data Cloud, Prism Analytics, WQL, and RaaS Extracts](https://kiweely.com/guides/workday-to-snowflake-databricks-data-cloud-prism-wql)
-   [Workday with MuleSoft, Boomi, and Workato: Choosing SOAP, REST, WQL, or RaaS and Governing Limits](https://kiweely.com/guides/workday-with-mulesoft-boomi-workato-integration-architecture)
-   [Workday 2027R1 Changes for Extend, Orchestrate, Studio, and APIs: Breaking Changes and Regression Checks](https://kiweely.com/guides/workday-2027r1-extend-orchestrate-studio-apis-breaking)

### From the blog on WQL

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

-   [Workday REST API vs. SOAP Web Services vs. WQL vs. RaaS: Coverage Gaps and Why Setup Still Needs the Task Screen](https://kiweely.com/blog/workday-rest-api-vs-soap-coverage-gaps)
-   [What happens after ChatGPT writes your WQL query](https://kiweely.com/blog/after-chatgpt-writes-your-wql)
-   [Workday 2027R1: The Five Changes Most Likely to Break Existing Reports, Security, and Integrations](https://kiweely.com/blog/workday-2027r1-five-changes-break-reports-security-apis)

## 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 in touch](https://kiweely.com/vine#partners) [See Vine at work](https://kiweely.com/vine/work)

## Get the next guide in your inbox.

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