Track 06 · Security & risk reviewLesson 06 of 10
SSO and provisioning for agents
Give the agent an enterprise identity before it gets a prompt.
- Lesson library · reference
- 35 min read
- 75 min hands-on
- Northvale Bank
- Pro
What you'll be able to do
01- Explain the difference between SAML 2.0 and OpenID Connect, and choose one for a given enterprise integration.
- Implement ID-token validation (signature,
iss,aud,exp,nonce, tenant) and spot the validation bugs that turn SSO into a bypass. - Design provisioning with SCIM 2.0 or just-in-time creation, including deprovisioning that revokes agent sessions, delegated tokens and in-flight runs.
- Map identity-provider groups to application roles safely, and set session lifetimes and step-up rules for consequential actions.
- Trace the end user's identity from login through the agent to each tool call, choosing the right OAuth flow at each hop.
- Answer the identity section of a customer security questionnaire with evidence rather than assurances.
Before you start
- Tools with scoped, auditable access: per-tool auth patterns, delegation versus impersonation, RFC 8693 at the tool.
- SaaS connectors and auth flows: OAuth grants, admin consent and token lifecycle at the connector.
- MCP: connecting agents to the customer's systems: why an MCP server must not pass a user's token through.
- Background: you have used a JWT and know what an OAuth access token is.
The short version
Enterprise identity answers three questions before the first prompt runs. Authentication (who is this?) comes from the customer's identity provider (IdP) through SSO, using OIDC or SAML. Provisioning (do they exist here, and still?) comes from SCIM, which lets the IdP create, update and deactivate users in your application. Authorisation (what may they do?) starts with mapping IdP groups to roles and continues in Authorization and multi-tenancy. The agent-specific work is carrying the person's identity through every hop with a narrower token at each, and making sure that when someone leaves, every session, delegated token and running job the agent holds for them stops.
Key takeaways:
- Validate ID tokens fully: signature with a pinned algorithm, exact issuer, audience, expiry, nonce and tenant. Decoding is not validating.
- Key users on the IdP's immutable ID (Entra's
oidwithtid), never on email or display name. - SCIM deprovisioning is the control the security team will test. It must revoke what the agent holds, not just flip a flag.
- Map groups by object ID, deny by default, and handle group overage.
- Delegation, not impersonation, from agent to tool: a narrower token per downstream audience, with both the user and the agent in the audit record.
Pro lesson
The rest of this lesson is in Pro.
The mental model, worked example, field note, failure table, exercise and self-check, with the voice tutor.
- Every stage and specialisation, in full
- Every lab and every role project
- Halden weeks 2–10, on your record
- Every drill, live in the playground
- All solutions, plus the server judge
- Lab Assistant and every Teach with AI