---
title: "Mapping Teams, Slack & Lark Users to Workday Worker OAuth"
description: "Why mapping chat user IDs over a shared Workday integration account leaks HR data, and how OAuth 2.0 Authorization Code + SSO binds each user to Workday."
url: https://kiweely.com/blog/mapping-teams-slack-lark-sso-identities-to-workday-workers
---

# Mapping Microsoft Teams, Slack, DingTalk, and Lark Identities to Workday Worker OAuth

Mapping chat emails or user IDs to Workday workers over a shared Integration System User bypasses Workday security and misattributes audit logs. Production apps bind each Teams, Slack, DingTalk, or Lark user to their own Workday OAuth 2.0 token via corporate SSO.

-   By Kiweely
-   November 15
-   6 min read

Never connect Microsoft Teams, Slack, DingTalk, or Lark to Workday by matching a chat user’s email address in middleware and calling Workday through a shared Integration System User (`ISU`). Bind each workplace identity to its own **Workday OAuth 2.0 Authorization Code + PKCE** session (`Register API Client`) federated through your corporate Identity Provider so Workday—not your chat bot—resolves the `Workday Account`, enforces constrained security domains, and writes the real person’s name into every business process audit trail.

Almost every internal engineering prototype starts with the shortcut: create `ISU_ChatBot`, grant it broad `Worker Data: Public Worker Reports`, `Worker Data: Time Off`, and `Approve_Business_Process` permissions, read `user.email` from the Slack or Microsoft Graph payload, query Workday for a matching `Primary Work Email`, and return the result. That shortcut passes a five-minute hackathon demo and fails the first serious enterprise security review.

## Shared Integration Account Lookup vs. Per-Worker Delegated OAuth

Compare what happens across identity resolution, authorization, auditability, and lifecycle revocation under both patterns:

| Security Control | Email / UPN Lookup + Shared `ISU` | Per-Worker OAuth 2.0 (`Register API Client` + PKCE) |
| --- | --- | --- |
|  **Identity Resolution** | Heuristic string match on `Primary Work Email` or custom attribute sync. | Cryptographic SAML `NameID` / OIDC claim mapped natively to `Workday Account`. |
|  **Authorization Engine** | Middleware `if/else` code tries to guess who manages whom; Workday sees an unconstrained `ISU`. |  **Workday evaluates live** across Supervisory Orgs, Matrix Orgs, Intersection Security Groups, and BP policies. |
|  **Blast Radius of a Bug** |  **Tenant-wide:** an off-by-one parameter or prompt injection can query any employee the `ISU` can see. |  **Self-contained:** the bearer token physically cannot read or mutate records outside that employee’s Workday access. |
|  **Process History & Audit** | Every approval or time-off entry logs `ISU_ChatBot` (or requires fragile custom tracking). | Workday Process History logs the exact worker (`Completed By: Jordan Vance`), matching browser actions. |
|  **Role Changes & Terminations** | Relies on SCIM/directory sync intervals; transferred managers can retain stale bot permissions. |  **Immediate:** Workday security recalculates on effective-dated staffing events and account disablement. |

## Four Concrete Ways Chat-to-Email Mapping Breaks in Production

### 1\. Email Collisions, Domain Mergers, and Contingent Workers

In any enterprise with 3,000+ workers, `email == worker` is not a 1-to-1 invariant:

-   **M&A and Brand Consolidations:** Acquired employees carry legacy Slack or DingTalk domains (`@subsidiary-a.com`) while HRIS updates Workday `Primary Work Email` to `@parentco.com` weeks earlier—or vice versa.
-   **Rehires and Conversion Events:** A contingent worker (`Contingent_Worker_ID`) converting to a full-time employee (`Employee_ID`) may have two historical worker records in Workday tied to the same corporate email address. A naive `Get_Workers` or WQL email filter either crashes on multiple matches or binds the chat user to the terminated contingent record.
-   **Executive Assistants and Shared Mailboxes:** Shared channels or delegated chat accounts break assumptions about who clicked an interactive approval button.

### 2\. Re-Implementing Workday Security in Bot Middleware Always Leaks

Suppose a manager clicks **View Team Balances** inside Slack or Lark. If your backend calls Workday using `ISU_ChatBot`, Workday returns data for *any* worker ID your backend asks for. Your backend engineer now writes a check: `if target.manager_id == caller.worker_id`.

Within weeks, real Workday security configurations break that check:

-   **Inherited Subordinate Orgs:** A Director manages managers and legitimately views two levels down, unless blocked by an **Intersection Security Group** excluding *Executive Compensation*.
-   **Active Business Process Delegations:** Manager A delegated `Request Time Off` approvals to Peer Manager B for one week via `Manage Delegations`. Your middleware check (`target.manager_id == caller.worker_id`) falsely blocks Manager B—or worse, someone loosens the middleware check and exposes data after the delegation expires.
-   **Rescinded Transfers:** When HR rescinds a *Change Job* transfer, Workday rolls back security group memberships instantaneously; cached org-tree tables in chat bots lag behind.

See [why Integration System Users are dangerous for employee-facing Workday tools](https://kiweely.com/guides/workday-register-api-client-vs-api-client-for-integrations) for the full domain comparison.

### 3\. Corrupted Business Process Audit Trails

SOX auditors and financial controllers inspect Workday’s **Process History** on `Expense Report Event`, `Requisition Event`, and `Enter Time` workflows. When an `ISU` executes `Approve_Business_Process` over SOAP or advances a step on behalf of a Slack button click, Workday records the `ISU` account as the step actor. Proving six months later which human actually approved a $14,000 purchase requisition requires stitching external chat server logs to Workday timestamps—an audit finding waiting to happen.

When the call executes with a user-delegated OAuth bearer token, Workday records the authenticated worker natively in [business process web-service audit history](https://kiweely.com/guides/workday-business-process-audit-trail-initiated-via-web-service).

### 4\. Interactive Card Replay and Spoofing Risks

In chat bots backed by a shared service account, an interactive webhook payload (`{"action": "approve", "event_step_id": "7ad3...", "chat_user_id": "U0492..."}`) arrives at your webhook receiver. Verify-signature bugs or forwarded adaptive cards have historically allowed unauthorized chat participants in a shared channel to trigger actions under the bot’s service credential. When every write requires the clicking user’s own Workday OAuth token, an unauthorized participant clicking a button in a shared Teams or Feishu channel receives an immediate `403` from Workday (`A212: This event step is not awaiting your action`).

## Reference Architecture: Binding Workplace Identities to Workday OAuth 2.0

A clean identity architecture treats Microsoft Teams, Slack, DingTalk, Feishu, and Lark strictly as **presentation surfaces**, never as authorization authorities:

text

```
[Teams / Slack / DingTalk / Feishu / Lark Client]
       │
       │ 1. Opens embedded tab / mini-app or clicks Sign In link
       ▼
[Stateless Pass-Through Connector / UI Host]
       │
       │ 2. Generates PKCE code_verifier + state bound to chat subject ID
       │ 3. Redirects to Workday /authorize?response_type=code&client_id=...&code_challenge=...
       ▼
[Workday Authorization Server] ◄──► [Corporate SAML 2.0 / OIDC IdP (Entra ID, Okta, Ping)]
       │
       │ 4. Validates SSO assertion -> maps to exact Workday Account
       │ 5. Returns single-use authorization code
       ▼
[Stateless Connector Exchanges Code + code_verifier at Workday /token Endpoint]
       │
       │ 6. Seals worker's access + refresh token (AES-256-GCM) bound to that chat user
       ▼
[Every Live Read/Write Calls Workday REST / WQL / SOAP as Bearer <employee_token>]
```

### Critical Implementation Details

1.  **Register a User-Delegated Client, Not an ISU Client:** Run the **`Register API Client`** task in Workday (never `Register API Client for Integrations`). Select **Authorization Code Grant**, check **Enforce PKCE**, set **Access Token Timeout**, and list only the minimum required **Functional Areas** (for example, *Absence*, *Time Tracking*, *Expenses*, *Tenant Non-Configurable*).
2.  **Cryptographically Bind `state` to the Verified Chat Identity:** Verify the Microsoft Teams SSO JWT (`tid` + `oid`), Slack signed interaction token (`team_id` + `user_id`), or Lark/DingTalk `open_id` *before* generating the OAuth `state` nonce. Store or seal the token strictly keyed to `(tenant_id, chat_platform, platform_org_id, platform_user_id)` so User B can never complete an OAuth callback initiated for User A.
3.  **Verify `workers/me` Upon Token Exchange:** Immediately call `GET /common/v1/workers/me` with the newly issued access token to confirm the authenticated Workday Worker ID and display name.
4.  **Align Token Lifetimes and Revocation:** Configure refresh token timeouts and [revocation rules for terminated or transferred workers](https://kiweely.com/guides/workday-revoke-oauth-tokens-terminated-transferred-workers) so disabling SSO or the `Workday Account` cuts off chat and AI access simultaneously.

## How Kiweely Uses Per-Employee Workday OAuth Everywhere

Both [Kiweely Leaf](https://kiweely.com/leaf) and [Kiweely Bridge](https://kiweely.com/bridge) (**both coming next**) enforce this exact per-worker OAuth model out of the box—never an Integration System User:

-   **[Kiweely Leaf](https://kiweely.com/leaf)** (coming next) embeds custom employee portals, manager views, and chat approval screens inside **Microsoft Teams, Slack, DingTalk, Feishu, and Lark**, in any browser, or inside the **Kiweely Leaf** mobile app. Every call runs live under the signed-in employee’s own Workday OAuth token with zero HR records stored at rest.
-   **[Kiweely Bridge](https://kiweely.com/bridge)** (coming next; see [Bridge security](https://kiweely.com/bridge/security)) connects **Claude, ChatGPT, and Gemini** to Workday via user-delegated `Register API Client` OAuth + PKCE, sealing tokens with AES-256-GCM on the client side, enforcing read-only access by default, and requiring an out-of-band browser approval card before any enabled write reaches Workday.

## Frequently asked questions

### Why shouldn't a Slack or Teams bot look up Workday workers by email address using an Integration System User?

Email-to-worker lookup over an Integration System User trusts the middleware to enforce every permission check. Email aliases change during mergers and name changes, contractors sometimes share or recycle addresses, every API write records the ISU in Workday Process History instead of the human approver, and a single bug in middleware filtering exposes every worker record the ISU can read.

### How does Workday OAuth 2.0 Authorization Code Grant map an employee's identity?

The user signs in through Workday's /authorize endpoint backed by SAML or OIDC Single Sign-On. Workday resolves the SAML NameID or OIDC claim directly to the user's Workday Account and issues an access token tied to that exact worker's security groups.

### What happens when a worker transfers departments or terminates in Workday?

With per-worker OAuth, role-based security groups (such as Manager or HR Partner) recalculate live inside Workday the moment a transfer takes effect, and disabling the Workday Account on termination invalidates API access without waiting for a chat directory sync.

### Does user-delegated Workday OAuth require employees to know a separate Workday password?

No. When SSO is configured on the tenant, opening the authorization URL inside Teams, Slack, DingTalk, or Lark redirects through the corporate Identity Provider (such as Entra ID or Okta) and completes silently or with Face ID/passkey.

## Read next

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

-   [November 15 ### How Workday’s Twice-Yearly Releases Break In-House MCP Servers and REST Integrations](https://kiweely.com/blog/how-workday-twice-yearly-releases-break-custom-mcp-servers)
-   [November 15 ### Turning Your Existing Workday RaaS Reports into Governed AI Tools](https://kiweely.com/blog/exposing-existing-workday-raas-reports-to-claude-and-chatgpt)
-   [November 15 ### Embedding Live Workday Time Off, Pay, and Approvals Inside DingTalk, Feishu, and Lark](https://kiweely.com/blog/embedding-workday-self-service-inside-dingtalk-feishu-lark)

### More guides on Integrations and APIs

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

-   [Designing for Workday Tenant API Concurrency and Rate Limits During Peak Employee Traffic](https://kiweely.com/guides/workday-api-rate-limits-concurrency-workforce-self-service)
-   [Calling Workday RaaS Reports with User-Delegated OAuth Instead of an ISU](https://kiweely.com/guides/workday-raas-user-delegated-oauth-vs-isu-basic-auth)
-   [Updating Preferred Name, Pronouns, and Contact Information via the Workday Person API](https://kiweely.com/guides/workday-person-api-legal-preferred-name-contact-updates)
-   [Restricting Workday OAuth Token Use by IP with Maintain IP Ranges](https://kiweely.com/guides/workday-maintain-ip-ranges-manage-authentication-policies-api)
-   [Why Browser Single-Page Apps Hit CORS and Token Limits Against Workday APIs—and How to Fix It](https://kiweely.com/guides/workday-cors-browser-api-calls-why-backend-pass-through-needed)
-   [Parsing Workday Business Process Custom Validation Errors Returned by REST and SOAP APIs](https://kiweely.com/guides/workday-business-process-validation-errors-rest-soap-responses)
-   [How Workday Audits Business Processes Initiated via REST or SOAP Web Services](https://kiweely.com/guides/workday-business-process-audit-trail-initiated-via-web-service)
-   [Approving, Denying, and Sending Back Workday Business Process Steps via REST and SOAP APIs](https://kiweely.com/guides/workday-business-process-approve-deny-rest-soap-api)

## Your Workday work, done by AI.

Kiweely Vine is the AI agent that builds, deploys and tests Extend apps as real people, makes changes in any Workday task screen, answers from your real tenant and builds reports.

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next one in your inbox.

One email a month for Workday teams: what’s changing in Workday and what to retest, one tip tried in a real tenant, and what’s new at Kiweely.
