---
title: "Fix Workday Extend OAuth OP-4008, EU URL & Basic Auth"
description: "Fix Workday Extend OAuth 2.0 Tenant mapping not found (OP-4008), resolve EU vs. US regional API gateway 401 errors, and configure client_secret_basic."
url: https://kiweely.com/guides/workday-extend-oauth-tenant-mapping-op-4008-eu-base-url-client-secret-basic
---

# Resolving “Tenant mapping not found (OP-4008)”, EU vs. US Regional Base URL 401 Errors, and client\_secret\_basic in Workday Extend OAuth 2.0

Connecting an external system to Workday Extend APIs via OAuth 2.0 Client Credentials can fail with OP-4008 (Tenant mapping not found) or 401 Unauthorized. Learn how to configure Create Client Credentials Mapping, select the right regional API Gateway URL, and enforce client\_secret\_basic.

-   **Checked** against Workday on November 6
-   Applies to **Workday Extend**
-   4 min read
-   Published November 6
-   By Kiweely

## Fixing `400 Bad Request: "Tenant mapping not found (OP-4008)"` on OAuth 2.0 Client Credentials

When an external application or integration middleware calls the Workday Cloud Platform OAuth 2.0 token endpoint (`/oauth2/v1/token`) using the **Client Credentials** grant type (`grant_type=client_credentials`) to write or read Workday Extend Model Business Object APIs, the gateway may reject the request with HTTP `400 Bad Request` and error code **`OP-4008`**:

json

```
{
  "error": "Tenant mapping not found (Error ID: 817891)",
  "status": 400,
  "errors": [
    {
      "code": "OP-4008",
      "title": "Tenant mapping not found"
    }
  ]
}
```

### Root Cause of `OP-4008`

Registering an API Client on the Workday Developer Site (or adding an Integration System User via **App Manager** > **Add Integration User** for Simplified ISU authentication inside the app) and creating an **External Client CredStore** (which is only used when Workday calls *outbound* to third-party APIs) does **not** automatically map an inbound OAuth 2.0 Client Credentials request to a specific tenant and Integration System User (ISU).

When an external system authenticates inbound with `grant_type=client_credentials`, the Workday Extend Authorization Service must look up which tenant and which ISU serve as the subject of the issued access token. If either the tenant mapping task in Workday or the `tenant_alias` form parameter in the token request is missing or mismatched, the gateway returns `OP-4008`.

### Step-by-Step Fix in the Workday Tenant and Token Request

1.  **Create the Integration System User (`ISU`)**: Run the **Create Integration System User** task in the target Workday tenant and assign the ISU to an Integration System Security Group (ISSG) that has **View** and **Modify** permissions on your Extend App’s security domain (followed by **Activate Pending Security Policy Changes**).
2.  **Register the API Client on the Workday Developer Site**: Under the customer account on the Developer Site, register the API Client with the required Extend App scopes and authorize the target non-development or development tenant.
3.  **Run `Create Client Credentials Mapping` in the Tenant**:
    -   In the target Workday tenant, run the **Create Client Credentials Mapping** task (secured by the *Integration Security* domain in the Integration functional area).
    -   Enter the exact **Client ID** from the Workday Developer Site Console.
    -   Select the **Integration System User** created in Step 1.
4.  **Include `tenant_alias` in the `x-www-form-urlencoded` Request Body**:
    -   When calling the token endpoint (`POST /oauth2/v1/token`), pass both `grant_type=client_credentials` and `tenant_alias=<your_tenant_alias>` in the `application/x-www-form-urlencoded` body.

## Resolving `401 Invalid Credentials` Caused by EU vs. US Regional API Gateway Base URLs

Even when your Client ID, Client Secret, and **Create Client Credentials Mapping** are valid, calling `https://api.us.wcp.workday.com/oauth2/v1/token` (or `https://api.workday.com`) for a customer tenant hosted in a European, UK, or Asia-Pacific data center fails with **`401 Unauthorized` / `Invalid Credentials`**.

Every Workday Extend enterprise account is bound to a specific regional API Gateway and Authorization Base URL. You cannot authenticate an EU-hosted customer account against the US API Gateway:

| Region | API Gateway Base URL | Authorization Base URL |
| --- | --- | --- |
|  **United States** | `https://api.workday.com` or `https://api.us.wcp.workday.com` | `https://auth.api.workday.com` or `https://api.us.wcp.workday.com/auth` |
|  **Germany (EU)** | `https://api.eu.wcp.workday.com` | `https://api.eu.wcp.workday.com/auth` |
|  **United Kingdom** | `https://api.uk.wcp.workday.com` | `https://api.uk.wcp.workday.com/auth` |
|  **Singapore** | `https://api.sg.wcp.workday.com` | `https://api.sg.wcp.workday.com/auth` |
|  **Personal Dev Accounts** | `https://api.odp.wcp.workday.com` | `https://api.odp.wcp.workday.com/auth` |

To verify which regional gateway a customer account uses, open your **Profile** on the Workday Developer Site (`https://developer.workday.com/profile`), where the assigned API Gateway URL is listed alongside each account. Use that exact regional host for both the OAuth 2.0 token request (`https://api.eu.wcp.workday.com/oauth2/v1/token`) and all subsequent Extend REST API calls (`https://api.eu.wcp.workday.com/apps/<appId>/v1/...`).

## Why `client_secret_post` Fails with `401 Unauthorized` (Enforcing `client_secret_basic`)

Many third-party integration platforms (and standard Workday Integration API Clients registered via **Register API Client for Integrations**) default to sending OAuth client credentials in the HTTP POST request body (`client_secret_post`).

However, **Workday Extend API Clients strictly require `client_secret_basic`**. If a third-party caller sends the Client ID and Client Secret in the `application/x-www-form-urlencoded` body instead of an `Authorization` header, the Workday Extend token endpoint returns **`401 Unauthorized`**.

### Formatting the `Authorization` Header for Workday Extend Token Requests

Encode `<Client_ID>:<Client_Secret>` (with no space after the colon) using Base64 and pass it in the HTTP `Authorization` header, while keeping only `grant_type` and `tenant_alias` in the URL-encoded form body:

http

```
POST /oauth2/v1/token HTTP/1.1
Host: api.eu.wcp.workday.com
Authorization: Basic <Base64(Client_ID:Client_Secret)>
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&tenant_alias=customer_tenant_dpt1
```

### Workarounds When the Third-Party Caller Only Supports `client_secret_post`

If the external application cannot be configured to send `client_secret_basic` headers:

1.  **API Gateway / Middleware Transformation**: Route the token request through your organization’s API Gateway (such as AWS API Gateway, Azure API Management, or MuleSoft) to extract the credentials from the POST body and inject the `Authorization: Basic ...` header before forwarding to Workday.
2.  **Read-Only WQL via Standard Integration API Client**: If the third-party application only needs to **read** data from your Workday Extend Business Object, register a standard Workday Integration API Client in the tenant (**Register API Client for Integrations**), which natively supports `client_secret_post`, and query the Extend Business Object’s data source via the WQL REST API (`/wql/v1/data`).

## How to Verify in the Tenant

1.  Run **View Client Credentials Mappings** in your Workday tenant and confirm that your Developer Site API Client’s **Client ID** is mapped to the active **Integration System User**.
2.  Check your Developer Site **Profile** to confirm whether the tenant’s account uses the `us`, `eu`, `uk`, or `sg` regional gateway URL.
3.  Execute a `POST` request to `<regional_gateway>/oauth2/v1/token` using `Authorization: Basic <Base64(Client_ID:Client_Secret)>` and `grant_type=client_credentials&tenant_alias=<tenant>`, confirming that Workday returns HTTP `200 OK` with a bearer access token, and use that token to `GET` or `POST` records on `/apps/<appId>/v1/<businessObject>`.

## Sources checked

-   [Authenticate Using the Client Credentials Grant Type](https://developer.workday.com/documentation/vle1524593542839)
-   [Reference: Workday Extend API Gateways and Authorization Base URLs](https://developer.workday.com/documentation/dlh1653340161856)
-   [Reference: OAuth2 Client Credentials](https://developer.workday.com/documentation/axp1537909839739)
-   [Reference: Workday App Manager](https://developer.workday.com/documentation/GUID-8e6a447c-c716-4fbb-82a5-eff3e6221629-enHYPHENus)
-   [Create Your API Client](https://developer.workday.com/documentation/zwx1518028675482)

## Related guides

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

-   [### Working Around the 10-Relationship Limit on a Workday Extend Model Business Object (MCBO) Using a Helper Object Workday Extend enforces a platform ceiling of 10 SINGLE\_INSTANCE and MULTI\_INSTANCE relationship fields per Model Business Object (MCBO) and 25 delivered target relationships per app. Learn how to reserve the 10th slot for a 1:1 helper extension object and query across both objects in WQL.](https://kiweely.com/guides/workday-extend-mcbo-10-single-instance-relationship-limit-helper-bo)
-   [### How to Blank Out Text Fields and Nullify Reference Values on Workday Extend Business Objects via Inbound EIB Using {empty} Leaving a spreadsheet cell blank or entering “” or null in an Inbound EIB does not clear existing field values on a Workday Extend Business Object. Learn how to use the {empty} tag, avoid the leading/trailing whitespace trap in Excel, and remove specific multi-instance values.](https://kiweely.com/guides/workday-extend-eib-clear-text-nullify-fields-empty-tag)
-   [### Fixing “Object instance has properties which are not allowed by the schema (parentBusinessProcesses, initiationPageRoute)” on Extend Subprocesses Adding an Extend Model Business Process as a subprocess of a delivered Workday business process fails validation if parentBusinessProcesses and initiationPageRoute are placed at the root of the .bp file or omit the {eventStepId} parameter. Learn the complete .bp, .amd, and .pmd configuration.](https://kiweely.com/guides/workday-extend-bp-subprocess-allowedparentprocesses-eventstepid)

### More guides on Extend apps and pages

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

-   [Cascading dropdowns and instance lists in Workday Extend](https://kiweely.com/guides/workday-extend-cascading-instance-lists)
-   [How to move Workday Extend apps to a new developer tenant before the old one expires or is deleted](https://kiweely.com/guides/workday-extend-move-apps-new-developer-tenant)
-   [Why a Workday Graph API query suddenly fails with “Cannot query field”](https://kiweely.com/guides/workday-graphql-cannot-query-field)
-   [How to build a worker search prompt in a Workday Extend page](https://kiweely.com/guides/workday-extend-worker-search)
-   [Which Workday Extend widget to use for what](https://kiweely.com/guides/workday-extend-widget-guide)
-   [Workday Extend Professional is now Extend AI: Core vs AI vs legacy limits, storage and AI features](https://kiweely.com/guides/workday-extend-legacy-vs-extend-professional)
-   [Model business processes in Workday Extend: how a transaction gets created and approved](https://kiweely.com/guides/workday-extend-model-business-process)
-   [Version control for Workday Extend apps: GitHub, Local Disk Sync and automated deploys](https://kiweely.com/guides/workday-extend-version-control-github)

### From the blog on Extend apps and pages

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

-   [Put a Workday Extend App in Git from Day One](https://kiweely.com/blog/workday-extend-git-from-day-one)
-   [Pairing Claude Code with a Personal Workday Extend Tenant for Portfolio Apps](https://kiweely.com/blog/claude-code-personal-workday-extend-tenant-portfolio)
-   [Claude Code Skills for Workday Extend: What Belongs in a Skill vs a Prompt](https://kiweely.com/blog/claude-code-skills-for-workday-extend)

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