Free & open · no paywall, ever

IntegrAuth Academy

Identity, security and practical AI — free, from zero. Byte-sized lessons, real diagrams, hands-on labs, zero fluff. Two programs, each with its own exam and certificate.

20 tracks 241 lessons 242 hands-on labs 230+ diagrams 100% free

English is hard? Your browser can translate this page into Tamil, Telugu, Kannada, Malayalam or Hindi. Tech words stay in English so you learn the real names.

How?
  • Chrome on phone: ⋮ menu → Translate
  • Chrome on computer: right-click → Translate to …
  • Edge: the translate icon in the address bar
Identity & API Security Track 7 · AI & Agents
0/166 lessons read
AI & AGENTS · LESSON 6

Delegated access to third-party accounts

Maya asks Kai to add an event to her calendar. Kai needs Maya's calendar, not her calendar password. That calendar belongs to another company, so access must cross company lines safely. Your goal: see how an agent can use another company's account without holding a password.

Key points
  • Never give an agent your password. Use OAuth tokens.
  • The refresh token is the most valuable secret.
  • A token vault keeps all refresh tokens in one place.
  • The agent gets a short-lived, scoped token for each call.

Why agents need your other accounts

Take the request "Summarize my inbox, book the follow-up and add it to the team calendar." Every part lives outside your app, at an email or calendar provider. An agent that cannot reach them is a toy. An agent that reaches them carelessly is a breach. Safe access must be three things.

🎯 Scoped

Calendar-read is not inbox-read. The agent gets the narrowest key that does the job.

🪪 Attributable

The provider sees a named app acting for a named user, not a mystery script.

↩️ Revocable

One click, by you or by the provider, and access is gone. No password change.

Never passwords, never screen-scraping

The old internet said, "Give us your email password and we will import your contacts." A bot logged in as you and read the pages (screen-scraping). A password gives everything, everywhere, with no end date. It cannot be scoped, attributed or revoked for one app. It also sits in one more database that can leak. If a bot holds your password, it is you.

OAuth delegation fixed this. You log in at the provider and approve a short list of permissions. The app gets tokens, not your password. An access token is a narrow key that expires, limited by a scope. A refresh token is the long-lived one that creates new access tokens. The refresh token is the most valuable secret in the system.

The vault: one custodian for tokens

A federated token vault is one custodian, run by your IdP, that holds all third-party refresh tokens. You connect a provider once. Its refresh token is stored in the vault, tied to your identity. It is not in the agent's database, not in the browser and not in a spreadsheet of "integration creds". When the agent needs the calendar, it shows its own session. The vault gives it a fresh, scoped access token. The agent uses the token and drops it. Refresh, rotation and storage are the vault's job.

Think of it like…

A hotel coat check. You hand over the coat once and get a numbered ticket. Whenever you want the coat, you show the ticket and the desk fetches it. You never carry the coat around, and you never hand out copies.

MayaKai (agent)Token vault (IdP)Calendar provider1 · connect once — consent at the provider (calendar scope)2 · refresh token → stored in vault3 · later: exchange MY session4 · short-lived, scoped access token5 · call the Calendar API
Figure — Connect once, check out per call. The agent never sees Maya's password, because that went only to the provider. The agent never holds the refresh token, because that lives in the vault. So a hacked agent yields nothing that lasts.
Why it matters

One custodian gives one inventory: "which apps reach which providers for which users" becomes a query. It gives one place to revoke: disconnect once and every consumer loses access. It gives no sprawl, because there are no per-app refresh-token stores to breach. The answer feeds the agent registry.

This fits with the rest. MCP governance controls the agent's tools. CIBA gets the human's yes. The vault holds the keys to other companies' systems. All of it comes together in a secure copilot.

🧪 Interactive lab — enable JavaScript to play with this one.

🧪 Try it free

See what third-party apps and agents can already reach in a user's account with Consent Check.