Databricks — Per-User Identity in Teams & Copilot Studio
01 / 12

Navigation

→ / SpaceNext slide
←Previous slide
HomeFirst slide
EndLast slide
SwipeTouch navigation
Click anywhere or press Esc to close

Per-User Identity in Teams and Copilot Studio

Bringing per-user identity into Genie Agents and Agent Bricks when access is surfaced through Microsoft Teams and Copilot Studio.

Scenario: employees asking Genie Agents questions from inside Teams and Copilot Studio, each seeing only their own row-level permissions

This deck covers the four integration paths, the two independent gates on per-user identity, the token exchange mechanics, and what breaks silently.

Agenda

What this deck covers.

1
Four integration paths into Genie Agents

A custom Teams bot, Copilot Studio in two credential modes, and the native marketplace app — each with a different identity model.

2
The confirmed token-exchange architecture

Teams sign-in through Entra ID, an RFC 8693 token exchange, and how that identity reaches Agent Bricks and Genie Agents.

3
The two-gate model

Token-layer identity is Gate 1. The Genie Agent's publish mode is Gate 2. Most rollouts only check the first.

4
What breaks silently: the Genie Agent publish mode

Why a correctly-configured OAuth token still doesn't guarantee per-user data access if the space is published EMBEDDED_CREDENTIALS.

5
How to verify before rollout

The two-user test, which setting to check on each path, and the gotchas that cause silent failures.

The issue

Genie Agents and Agent Bricks are reachable from Teams and Copilot Studio through four different paths — each handling identity differently.

4
distinct integration paths into Genie Agents from Teams and Copilot Studio

The four paths

  • Custom AI agent + Azure Bot Service + OAuth federation
  • Copilot Studio via MCP, “End user credentials” mode
  • Copilot Studio via MCP, “Maker credentials” mode
  • Native “Databricks Genie Agents” app from Teams/M365 Copilot marketplace

The question every rollout has to answer

When two different employees ask Genie Agents the same question from inside Teams or Copilot Studio, do they get answers scoped to their own row-level permissions — or the same answer regardless of who's asking?

The answer depends on which of the four paths is in use, and on two separate settings, not one. The four paths look similar from the client side, which is exactly what makes this easy to get wrong.

What — the four paths

Four paths into Genie Agents from Teams and Copilot. They don't share an identity model.

PathToken-layer identityConfidence
Custom AI agent + Azure Bot Service + OAuth federation Per-user OBO Code-traced from official reference implementation
Copilot Studio via MCP, “End user credentials” Per-user (U2M) Confirmed in official docs
Copilot Studio via MCP, “Maker credentials” Shared, by design Intentional M2M mode, not per-user
Native “Databricks Genie Agents” app (Teams / M365 Copilot marketplace) Per-user (Entra ID) Confirmed per-user sign-in required

All four paths gate on the same second condition: the Genie Agent's publish mode. Regardless of which integration you choose, verify that the space is published VIEWER, not EMBEDDED_CREDENTIALS.

What — the confirmed architecture

A Teams sign-in card, one token exchange, and the human's identity all the way to Genie Agents.

Teams Usersign-in card
→
Entra IDaccess_as_user scope
→
/oidc/v1/tokenRFC 8693 exchange
↓
No client_id in exchange = per-user token, not SP
Agent Bricks SupervisorOBO auto-forwarded to Genie Agents sub-agent
↓

current_user() = the human at the Genie Agents/UC layer. Gate 1 passed: the human's identity reached Databricks. But Gate 2 (the space's publish mode) still decides whether RLS fires.

What — two gates, not one

Per-user identity depends on two separate settings.

Gate 1 — Token layer

Did a real per-user token reach Databricks?

OAuth federation, no client_id in the exchange, “End user credentials” selected in Copilot Studio. This is the gate everyone checks — and the one all the setup guides walk you through.

Gate 2 — Genie Agent publish mode

Is the space published VIEWER, not EMBEDDED_CREDENTIALS?

This lives on the space, not the client integration. It's invisible from the Teams bot's or Copilot Studio connector's configuration screen — you have to check the space directly.

Why this matters

Every Teams and Copilot rollout hits this question — and getting it wrong fails silently.

“We're putting Genie Agents in Teams so employees can ask questions without leaving chat. But when two different employees both ask for their region's revenue, do they get different answers scoped to their access — or the same answer?”
4
distinct integration paths
1
answer everyone assumes, wrongly

The assumption that trips people up

“We used OAuth / OBO, so we're covered.” Getting the token layer right is necessary — and, on its own, not sufficient. There's a second setting, on the Genie Agent itself, that decides whether any of that per-user auth actually reaches the data.

The concrete consequence

If Gate 2 is missed, every user sees the exact same data — regardless of how correctly the token exchange, OAuth federation, or Copilot Studio credential setting is configured upstream. There's no error and no warning; the space just quietly runs every query as its publisher.

How — the token exchange

The exchange, traced from Databricks’ own reference implementation.

Token exchange
POST {databricks_host}/oidc/v1/token

grant_type=urn:ietf:params:oauth:
  grant-type:token-exchange
&subject_token={entra_jwt}
&subject_token_type=
  urn:ietf:params:oauth:token-type:jwt
&scope=all-apis
# Critical: no client_id
# Omitting it keeps this per-user
Result — token used as-is by the SDK
workspace_client = WorkspaceClient(
    host=databricks_host,
    token=oauth_db_token,
)
# calls to the serving endpoint now carry
# the user's identity; Agent Bricks OBO
# forwards it automatically to Genie Agents

This RFC 8693 exchange is the account-wide standard for per-user federation from any external IdP. Teams + Azure Bot Service is a new front-end for the same pattern used by Power BI Embedded and other clients.

How — check the publish mode

One setting decides who the SQL runs as — regardless of the token.

Publish modeWho the SQL runs asPer-user RLS?
VIEWER The calling identity — the human, if a per-user token reached the API Yes
EMBEDDED_CREDENTIALS The space's publisher — always No

Critical: This setting lives on the Genie Agent itself, not on the Teams bot configuration or Copilot Studio connector. Don't infer it from the client integration settings. You have to check the space's publish mode directly.

How — what to do, per path

Which path, and what to verify on each.

Building a custom Teams bot

Use Azure Bot Service + OAuth federation

Officially documented pattern. Check Gate 2 on the target Genie Agent before shipping.

Using Copilot Studio

Select “End user credentials,” not “Maker credentials”

Gives real per-user identity — still gated by Gate 2. “Maker credentials” is fine when shared access is the actual intent.

Using the native Databricks Genie Agents app

Per-user sign-in is built in

The marketplace apps require users to sign in with their Databricks identity. Still gated by Gate 2: verify the space's publish mode before rollout.

Every path, no exceptions

Check the Genie Agent's publish mode directly

Don't infer it from the client integration's settings. It's a property of the space, and it silently overrides everything upstream of it.

How — gotchas

What breaks quietly if you skip the fine print.

IssueDetail
Correct per-user token, wrong Genie Agent publish modeThe most common silent failure. OAuth is right, but the space runs as publisher. Check the space's own settings, not the client integration.
Include client_id in token exchangeNever include it. If you do, it selects a service principal and collapses RLS to the SP's identity regardless of whose token called it.
preferred_username claim mismatchThe federation policy's subject_claim must match what your Entra tenant actually issues. If tenant issues upn instead, the exchange fails silently.
Confusing two “Teams + Genie Agents” integrationsThe native marketplace app (automatic warehouse, no PrivateLink) is different from custom Azure Bot Service (manual setup, full control). Confirm which one before designing RLS.
“Maker credentials” in Copilot StudioThis is intentionally shared M2M by design, not an incomplete OBO mode. Use it when you want shared access.
TWO GATES. ONE IDENTITY. EVERY SURFACE.
Check the token. Check the space. Don't assume either from the other.
Databricks Applied AI Governance Series