When Workday refreshes your Sandbox tenant during the weekly maintenance window, it does not merge configuration—it replaces the entire Sandbox instance with a point-in-time snapshot of Production. Any OAuth client created only in Sandbox disappears on Monday morning, while every API Client registered in Production copies down into Sandbox with its Production Client ID, Scope (Functional Areas), and Redirection URI intact.
Teams building external portals, analytics pipelines, or AI integrations run into two opposite failures right after a refresh: either their test client vanishes (invalid_client), or a copied Production client redirects Sandbox sign-ins straight back into a live Production callback endpoint. Understanding exactly which OAuth properties are tenanted data versus host-derived URLs eliminates post-refresh outages completely.
Artifact-by-Artifact Impact of a Sandbox Refresh
Use this reference matrix to audit what survives, what gets wiped, and what changes value when Production overwrites Sandbox (or when an Implementation or Sandbox Preview tenant refreshes):
| OAuth / Security Artifact | Created Only in Sandbox | Created in Production Before Refresh | Post-Refresh Action Required |
|---|---|---|---|
| OAuth / Security ArtifactRegister API Client entry (Authorization Code / PKCE) | Created Only in SandboxDeleted | Created in Production Before RefreshCopied to Sandbox with identical Client ID and Client Secret | Post-Refresh Action RequiredRegister persistent clients in Production (or disable/restrict per environment), or recreate temporary Sandbox clients |
| OAuth / Security ArtifactRegister API Client for Integrations entry | Created Only in SandboxDeleted | Created in Production Before RefreshCopied to Sandbox with identical Client ID | Post-Refresh Action RequiredRegenerate or verify ISU refresh grants in Sandbox if you rotate integration secrets |
| OAuth / Security ArtifactAuthorization Endpoint & Token Endpoint | Created Only in SandboxDeleted with the client | Created in Production Before RefreshRewritten automatically in View API Clients to reflect the Sandbox host and tenant alias | Post-Refresh Action RequiredPoint your staging app at the Sandbox /authorize and /oauth2/{sandbox_tenant}/token URLs |
| OAuth / Security ArtifactRedirection URI list on the API Client | Created Only in SandboxDeleted | Created in Production Before RefreshCopied verbatim from Production | Post-Refresh Action RequiredInclude staging/localhost URIs carefully or maintain dedicated non-production callback routes |
| OAuth / Security ArtifactDisabled on Tenants / client enablement flags | Created Only in SandboxDeleted | Created in Production Before RefreshCopied verbatim from Production | Post-Refresh Action RequiredVerify environment restrictions on integration clients so Sandbox jobs cannot run unintended external syncs |
| OAuth / Security ArtifactOAuth 2.0 Refresh Tokens issued in Sandbox | Created Only in SandboxInvalidated / Wiped | Created in Production Before RefreshProduction user sessions do not grant live Sandbox access tokens without re-authorizing against Sandbox | Post-Refresh Action RequiredInteractive users sign in once on the Sandbox authorize URL; rotate ISU tokens in Manage Refresh Tokens for Integrations |
| OAuth / Security ArtifactEdit Tenant Setup - Security SAML IdPs & Redirect URLs | Created Only in SandboxOverwritten by Production | Created in Production Before RefreshCopied, honoring Used for Environments and Preview Only flags | Post-Refresh Action RequiredConfigure Sandbox environment rows in Production so SSO works immediately after every refresh |
| OAuth / Security ArtifactDeveloper Site Console API Clients (Extend / WCP) | Created Only in SandboxUnaffected (stored in Developer Site account, not tenant DB) | Created in Production Before RefreshGoverned by Modify Authorized Tenants allowlist | Post-Refresh Action RequiredEnsure the Sandbox tenant alias remains on the Company Administrator’s authorized tenant allowlist |
For the broader mechanics of weekly Sandbox vs. semi-annual Sandbox Preview vs. on-demand Implementation refreshes, see what a Workday Sandbox refresh wipes and Workday tenant types explained.
Why Sandbox-Only API Clients Vanish Every Weekend
In Workday’s architecture, anything created via Register API Client or Register API Client for Integrations is tenanted data, just like a custom report, calculated field, or security group. Because the standard Sandbox refreshes every weekend from Production:
- On Thursday, an administrator runs Register API Client in Sandbox, copies the generated
Client ID, and wires a staging web app to Sandbox. - Over the weekend, Workday replaces Sandbox with Production’s database.
- On Monday morning, that
Client IDno longer exists anywhere in Sandbox’s View API Clients report. Every OAuth/authorizecall fails immediately, and token exchanges returninvalid_client.
If you are iterating on a multi-week build and are not ready to create the client registration in Production, build against an Implementation tenant instead. Implementation tenants only refresh on demand through Customer Central or a support request, giving you a stable Client ID until cutover. Note that Object Transporter (OX 2.0) does not migrate OAuth client secrets or active refresh grants across tenants—treat API Client registration as an explicit environment cutover checklist item, as detailed in copying configuration between Workday tenants.
How Production Redirect URLs Cause Cross-Environment Collisions
Once an integration or employee application goes live in Production, its API Client exists in Production—which means every weekly refresh copies that registration into Sandbox. That solves the vanishing Client ID problem, but introduces a subtle redirect trap:
- Workday dynamically updates the Workday REST API Endpoint, Token Endpoint, and Authorization Endpoint displayed on View API Clients to match the current tenant’s hostname and tenant name.
- Workday does not rewrite the Redirection URI or Allowed Origins (CORS) fields you typed into the API Client definition.
Suppose your Production API Client only lists https://portal.company-domain.example/oauth/callback as its Redirection URI. When a developer initiates an OAuth sign-in against the Sandbox Authorization Endpoint using that copied Client ID:
GET /{sandbox_tenant}/authorize?response_type=code&client_id=copied_prod_client_id&redirect_uri=https://staging-portal.company-domain.example/oauth/callback&code_challenge=...&code_challenge_method=S256 HTTP/1.1Workday rejects the request because https://staging-portal.company-domain.example/oauth/callback is not registered on the client. Worse, if the developer omits redirect_uri (which Workday treats as optional when a single URI is registered), Workday authenticates the user in Sandbox and then sends the 302 Found redirect—carrying a Sandbox authorization code—to the Production callback server, where the token exchange fails because the Production server tries to redeem a Sandbox code against the Production token endpoint.
Two Clean Patterns for Production-to-Sandbox Survival
Pick one of these two patterns depending on your security team’s posture:
- Environment-specific API Clients registered in Production with tenant scoping: Register two distinct clients in Production—for example,
Portal User OAuth (Prod)with your Production callback URI, andPortal User OAuth (Non-Prod)with your staging callback URI. Disable or restrict the non-production client in Production, and after a Sandbox refresh, enable only the non-production client in Sandbox via Edit API Client from View API Clients. - Tenant-aware router callback (used by multi-tenant cloud platforms): Register a single HTTPS callback endpoint controlled by an environment-aware proxy that validates the cryptographic
stateparameter tied to the originating tenant session, ensuring a Sandboxcodeis only ever redeemed against that exact Sandbox tenant’s token endpoint.
SSO Redirection URLs and SAML IdP Survival in Edit Tenant Setup - Security
Even when your OAuth API Client and Redirection URI are right, user-delegated OAuth still fails after a Sandbox refresh if corporate SSO redirects Sandbox users to a Production-only SAML Identity Provider assertion consumer URL.
Unlike Register API Client, Workday built explicit environment awareness directly into Edit Tenant Setup - Security so you can configure SSO once in Production and never touch it after a refresh:
- Open Edit Tenant Setup - Security in Production (requires Set Up: Tenant Setup - Security in the System functional area).
- Under Single Sign-On → Redirection URLs, add separate rows by selecting Sandbox or Implementation at the Environment prompt (which also governs Sandbox Preview and Implementation Preview respectively). If a Preview tenant needs a distinct URL from standard Sandbox, add a second row for that environment and check Preview Only.
- Under SAML Setup → SAML Identity Providers, populate Used for Environments (
Production,Sandbox,Implementation) on each IdP row so Workday automatically activates the Sandbox SAML trust relationship the moment Production copies into Sandbox.
Refresh Survival for External Employee Apps and AI Connectors
Whenever an external platform connects to both Production and non-production Workday tenants, verify how it isolates tenant routes across refreshes. Both Kiweely Bridge (coming next, where one company plan covers Production plus every Sandbox, Sandbox Preview, and Implementation tenant) and Kiweely Leaf (coming next) bind each tenant connection to its own explicit Workday authorize and token endpoints under user-delegated OAuth, so a weekly Sandbox refresh never crosses credentials or mixes staging tests with live Production worker records.
Post-Refresh Verification Checklist
Run these five checks in Sandbox after any scheduled or ad-hoc refresh before handing the environment back to testers:
- Open View API Clients in Sandbox and confirm your expected Client ID is present, enabled, and lists the staging Redirection URI and Allowed Origins.
- Copy the Authorization Endpoint and Token Endpoint directly from Sandbox’s View API Clients screen rather than editing Production hostnames by hand (Sandbox often sits on a different Workday data center host than Production).
- Verify on Edit Tenant Setup - Notifications that email, push, and SMS restrictions are active so API-triggered business processes in Sandbox cannot notify real workers.
- Confirm SAML sign-in completes on the Sandbox Authorization Endpoint without bouncing to the Production tenant login screen.
- Complete one end-to-end PKCE authorization code exchange as a test worker and confirm the resulting Bearer grant reads data solely from the Sandbox tenant.
Frequently asked questions
Why did my Sandbox OAuth Client ID stop working on Monday morning?
Workday refreshes the standard Sandbox tenant every weekend by replacing it completely with a fresh snapshot of Production. Any API Client created only in Sandbox and never registered in Production is erased during the refresh, causing Monday OAuth requests to fail with invalid_client.
Does a Production API Client keep the same Client ID in Sandbox after a refresh?
Yes. Tenanted API Clients created via Register API Client or Register API Client for Integrations in Production are copied into Sandbox with the exact same Client ID and Functional Area scopes, while Workday automatically rewrites the Token Endpoint and Authorization Endpoint on View API Clients to use the Sandbox host and tenant name.
If Production API Clients copy to Sandbox, can a Sandbox test accidentally hit Production?
Only if your external application keeps calling the Production Token or REST base URL, or if the copied API Client only lists a Production Redirection URI so the OAuth browser callback lands on your live Production server instead of your staging environment.
How do Developer Site API Clients behave differently from tenant-registered API Clients during a refresh?
API Clients created in the Workday Extend Developer Site Console live outside individual tenant data and govern access through a Company Administrator tenant allowlist (Modify Authorized Tenants), whereas tenant-registered clients created in Register API Client are tenanted objects that get overwritten whenever Sandbox refreshes from Production.