---
title: "Migrate CredStore OAuth & Masked Secrets in Orchestrate"
description: "Store OAuth 2.0 client credentials in External Client CredStore, mask non-OAuth keys in Integration Attributes, and manage Sandbox refreshes across tenants."
url: https://kiweely.com/guides/workday-orchestrate-migrate-external-client-credstore-secrets
---

# Storing and Migrating External Client CredStore OAuth Credentials and Masked Integration Attributes in Workday Orchestrate

Store external OAuth 2.0 credentials in Workday’s External Client CredStore and non-OAuth credentials in masked Integration Attributes (Password display option). After promoting an app or refreshing a Sandbox tenant from Production, update the target tenant’s CredStore and attribute values.

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

## Choosing Between External Client CredStore and Integration Attributes in O4I

When an **Orchestrate for Integrations (O4I)** orchestration authenticates to an external REST endpoint (such as SharePoint, ServiceNow, or a banking gateway) via **Send HTTP Request**, never hardcode client IDs, client secrets, or bearer credentials inside **Create Values**, **Create Text Template**, or HTTP header expressions. Workday provides two tenant-managed mechanisms depending on the authentication protocol:

| Authentication Scenario | Recommended Storage in Workday | How Orchestrate Consumes It |
| --- | --- | --- |
|  **OAuth 2.0** (Client Credentials, Authorization Code, JWT Bearer) |  **External Client CredStore** (`Manage External Credentials` / **Cred Store Reference**) | Selected on the **Auth** tab of **Send HTTP Request** via an Orchestration Credential (`Type -> OAuth -> Cred Store Reference`). |
|  **Non-OAuth** (Custom Header Keys, Multi-Tenant SharePoint Site IDs, Basic Auth, Vendor App IDs) |  **Integration Attributes** on the Integration System configured with the **Password** display option (or **App Attributes** via `attrstore`) | Read dynamically at runtime via `intsys.stringAttributeValue("AttributeName")` (or `attrstore.stringValue("AttributeName")`). |

* * *

## Configuring External Client CredStore for OAuth 2.0 in Orchestrate

As noted in **Create Orchestration Credentials**, Workday recommends always using the **Cred Store Reference** option for OAuth 2.0 connections in Production and non-production tenants:

1.  **Create the External CredStore Entry in the Tenant:** In your Workday tenant, create or configure the **External Client CredStore** entry containing the external application’s OAuth 2.0 Client ID, Client Secret, and Token Endpoint URL, and note its Reference ID.
2.  **Bind the CredStore Reference in Orchestration Settings:**
    -   Open your orchestration in **Orchestration Builder** and select **Settings > Credentials**.
    -   Click **Add Credential**, enter a **Credential Name** (for example, `SharePointOAuthCred`), and select **Type: OAuth**.
    -   Under **OAuth Type**, select **Cred Store Reference**.
    -   Enter the tenant’s **Reference** ID in the **Reference** expression field (or pass it dynamically from an Integration Attribute using `intsys.stringAttributeValue("CredStoreRefId")`).
    -   From the **Client Authentication** drop-down menu, select whether the external OAuth server expects client credentials in the request header (`Basic` auth header) or the request body.
3.  **Select the Credential on `Send HTTP Request`:** On your **Send HTTP Request** step, open the **Auth** tab and select `SharePointOAuthCred` from the **Authentication** drop-down menu. At runtime, Orchestrate automatically requests the OAuth 2.0 access token from the configured token endpoint and injects the `Authorization` bearer header into your outbound HTTP call.

Workday recommends rotating secrets in the CredStore at least one week before expiration while both old and new versions remain valid on the external provider to avoid cutover failures.

* * *

## Storing Non-OAuth Secrets and Multi-Site IDs in Masked Integration Attributes

When an orchestration connects to multiple external endpoints (for example, routing Customer Invoice PDFs to different SharePoint sites based on `Customer_Group`) or requires non-OAuth credentials (custom headers, application IDs, or shared keys) that are not managed through an OAuth token exchange:

1.  In the Workday tenant, open your O4I **Integration System** and select **Related Actions > Integration System > Configure Integration Attributes**.
2.  Add an Integration Attribute for each sensitive value (such as `SharePoint_Tenant_Id` or `Vendor_Auth_Secret`) and enable the **Password** display option on sensitive attributes so the value is masked (`********`) in the Workday UI and excluded from plain-text logs.
3.  Read the attribute value at runtime inside your orchestration using the `intsys` global function qualifier:

javascript

```
// Retrieve a required Integration Attribute (throws if missing)
intsys.stringAttributeValue("SharePoint_Tenant_Id")

// Retrieve an Integration Attribute with a safe fallback
intsys.stringAttributeValueOrDefault("SharePoint_Site_Path", "/sites/DefaultInvoices")
```

If different `Customer_Group` values map to different SharePoint site URLs or CredStore Reference IDs, configure an **Integration Map** on the Integration System and look up the target value per group using `intsys.mapLookup("CustomerGroupToSiteMap", data.LoopGroups.customerGroup)`.

* * *

## Managing CredStore Credentials Across Promotions and Weekly Sandbox Refreshes

When promoting an O4I app from **Development -> Implementation / Sandbox -> Production** (or after a Friday **Sandbox refresh** copies Production data and configuration over your Sandbox tenant), you must prevent Sandbox orchestrations from authenticating against Production external endpoints.

### 1\. Why Sandbox Refreshes Overwrite Tenant CredStore Entries

A full Sandbox refresh clones the Production tenant’s configuration—including the Production **External Client CredStore** entries, Integration System attribute values, and Integration Maps—into the Sandbox tenant:

-   If your orchestration uses **OAuth 2.0 Authorization Code (Refresh Token)** grants, the refresh token is scoped to the tenant where authorization was performed; after deploying or refreshing, an administrator must re-authorize the OAuth connection in the target tenant’s CredStore to generate a valid tenant-scoped token.
-   If your orchestration uses **OAuth 2.0 Client Credentials** (which has no interactive refresh token), a Sandbox refresh copies the **Production** Client ID, Client Secret, and Production Token URL into Sandbox! Left unchanged, any O4I run in Sandbox will immediately obtain a Production access token and push test data to your external Production system.

### 2\. Post-Refresh and Post-Promotion Safeguards

To ensure O4I always uses the correct environment credentials after app promotion or a weekly Sandbox refresh:

1.  **Externalize Both the Base URL and the CredStore Reference via Integration Attributes:** Instead of hardcoding the external API hostname in **Send HTTP Request** or a single static CredStore Reference ID, read both from Integration Attributes (`intsys.stringAttributeValue("External_API_Base_URL")` and `intsys.stringAttributeValue("External_CredStore_Ref")`).
2.  **Maintain Separate Sandbox and Production CredStore Entries or Include Post-Refresh Runbook Steps:**
    -   Either maintain two distinct CredStore entries in Production (`EXT_API_PROD_CRED` and `EXT_API_SBX_CRED`, where `EXT_API_SBX_CRED` holds the external sandbox client credentials) and switch the Integration Attribute / App Attribute in Sandbox after refresh, **or**
    -   Include updating the External Client CredStore secret and token URL in your mandatory **Sandbox Post-Refresh Checklist** before enabling scheduled O4I integrations in Sandbox.

* * *

## Verifying Credential Isolation in Your Tenant

1.  In your Workday tenant, inspect the O4I **Integration System** under **View Integration System > Integration Attributes** and verify that sensitive attributes are masked (`********`) and non-production URLs/CredStore references point to your external sandbox environment.
2.  Trigger a test run of the orchestration in your non-production tenant and inspect **Orchestration Activity** (and the external sandbox system’s access logs) to confirm that **Send HTTP Request** authenticates using the sandbox CredStore reference without exposing secrets in the step logs.

## Sources checked

-   [Create Orchestration Credentials](https://developer.workday.com/documentation/GUID-d93db6e9-f07a-4e89-9ad0-2070f54c3286)
-   [Reference: Intsys Global Functions](https://developer.workday.com/documentation/GUID-5205a574-c7e1-4c66-94d4-ad027827b544)
-   [Reference: Attrstore Global Functions](https://developer.workday.com/documentation/GUID-a91f0ad5-1dc3-419d-8bdf-8b5e1a49c986)
-   [Create Integration App Attributes](https://developer.workday.com/documentation/GUID-7c31d30e-c5cc-491c-9dff-0601d4d8ce7c)
-   [Reference: Migrating Integration Apps Between Tenants](https://developer.workday.com/documentation/GUID-2a48aa99-eb34-4d21-93e5-88120a02c058)

## Related guides

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

-   [### Reading Integration Launch Attachments, Calling SOAP Integrations API, and Uploading ZIPs to Workday Drive in O4I In Orchestrate for Integrations (O4I), read launch files via an Integration Retrieval Service (‘Attach file at launch’) and documents.get(0). For Get\_Event\_Documents over SOAP, use /soap/v46.2/Integrations with .wrapSoapV11(), and test Workday Drive ZIP uploads outside Debug Mode.](https://kiweely.com/guides/workday-orchestrate-read-integration-attachment-retrieval-service)
-   [### Preventing Duplicate Records on Orchestration Rerun and Concurrent Webhook Triggers in Workday Rerunning a partially failed orchestration or handling two webhook events firing seconds apart can create duplicate records in Workday. Replace report-fetch-delete-create sequences with atomic REST Batch calls (continueOnFailure: false), deterministic reference IDs, or staging queues.](https://kiweely.com/guides/workday-orchestrate-idempotency-concurrent-webhooks-duplicates)
-   [### Reading the HTTP Response Content-Type Header in Workday Orchestrate In Workday Orchestrate, data.SendHTTPRequest.responseHeaders.toString() omits the HTTP response Content-Type header. Call the Data member function data.SendHTTPRequest.response.contentType() directly on the response object to validate MIME types before uploading files to Workday.](https://kiweely.com/guides/workday-orchestrate-http-response-content-type-header)
-   [### Waiting for Import\_Payroll\_Input\_Request Background Processes at Scale in Workday Orchestrate Calling Import\_Payroll\_Input\_Request in Workday Orchestrate spawns an asynchronous background process. Instead of polling WQL in a fixed-iteration loop, invoke the import inside a child O4I integration via Trigger Integration, which waits for all spawned background jobs to complete before resuming.](https://kiweely.com/guides/workday-orchestrate-wait-background-process-import-payroll-input)

### More guides on Orchestrate

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

-   [JSONPath Logical Filter Expressions and Wildcard XPaths in Workday Orchestrate](https://kiweely.com/guides/workday-orchestrate-jsonpath-logical-filters-xpath-wildcards)
-   [Transforming dynamic-key JSON to CSV and grouping flat CSV rows into nested JSON in Orchestrate](https://kiweely.com/guides/workday-orchestrate-dynamic-json-keys-to-csv-grouped-json)
-   [Custom CSV formatting in Workday Orchestrate: Windows CRLF line endings, title rows, and skipping preamble lines](https://kiweely.com/guides/workday-orchestrate-csv-crlf-title-row-skip-header-lines)
-   [Resolving ‘\[StepException\] requirement failed: Input lists must be of the same size’ in createReferenceList](https://kiweely.com/guides/workday-orchestrate-createreferencelist-input-lists-same-size)
-   [Fixing ‘Fast forwarding to correct position’ and 45-minute timeouts in Orchestrate batchLoop](https://kiweely.com/guides/workday-orchestrate-batchloop-paginatedget-fast-forwarding-timeout)
-   [Overcoming ‘Message length should be lesser than 1MB in size’ and ‘Orchestration is too large to be saved’](https://kiweely.com/guides/workday-orchestrate-1mb-message-limit-too-large-to-save)
-   [Handling Silent GraphQL Errors in PMD and Orchestrate When HTTP Status Returns 200 OK](https://kiweely.com/guides/workday-graphql-http-200-silent-mutation-errors)
-   [Avoiding the 25-Second Synchronous Timeout When an Extend Page Calls External LLM APIs Through Orchestrate](https://kiweely.com/guides/workday-extend-async-orchestration-llm-timeout)

### From the blog on Orchestrate

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

-   [Why Workday Studio Remains Essential in an Orchestrate World](https://kiweely.com/blog/why-workday-studio-still-matters-with-orchestrate)
-   [Debugging Workday Extend apps and orchestrations in kiweely](https://kiweely.com/blog/debugging-workday-extend-apps-orchestrations-kiweely)
-   [Kiweely Roots vs Workday EIB, Studio, and Orchestrate](https://kiweely.com/blog/kiweely-roots-vs-workday-eib-studio-orchestrate)

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