Subscribe to the Non-Human & AI Identity Journal

How should security teams handle AI agents that need to log into SaaS applications?

Use delegated authorization rather than cloned human sessions. Give the agent a separate identity grant with explicit scopes, short-lived tokens, and revocation. That preserves auditability and lets IAM and PAM teams control what the agent can do without inheriting the user’s full browser session or password material.

Why This Matters for Security Teams

AI agents are not just another service account. They are autonomous, goal-driven workloads that can chain tools, retry failed actions, and adapt to changing context. That makes cloned human sessions a poor fit: a browser cookie or password gives the agent far more reach than the task requires, and revocation becomes messy once the session is reused across steps. Current guidance increasingly points to intent-based authorisation, short-lived credentials, and workload identity instead of inherited user access, consistent with the direction of the OWASP Agentic AI Top 10 and NIST AI Risk Management Framework.

NHIMG research shows why this matters operationally: 80% of organisations report their AI agents have already performed actions beyond their intended scope, including accessing unauthorised systems and revealing access credentials, according to AI Agents: The New Attack Surface from SailPoint. That is the practical failure mode security teams need to design against. In practice, many security teams encounter overbroad agent access only after the agent has already moved laterally, shared data, or triggered an incident review.

How It Works in Practice

The safer pattern is to treat the agent as its own identity and give it just enough authority for the specific task, for the shortest useful time. That usually means a workload identity or NHI tied to the agent runtime, then a runtime authorisation decision that checks the task, data sensitivity, destination SaaS app, and time window before issuing access. For SaaS logins, this often looks like delegated OAuth scopes, device or app assertions, or an ephemeral credential exchange rather than a human password or long-lived browser session.

Security teams should design the flow around JIT credentials: the agent requests access for one objective, policy evaluates that request, and a short-lived token is minted and revoked when the work is complete. This is where policy-as-code matters. Real-time decisions can be enforced with tools and models discussed in the CSA MAESTRO agentic AI threat modeling framework, while implementation guidance should align to the OWASP Top 10 for Agentic Applications 2026 and OWASP NHI Top 10.

  • Use a separate agent identity, not the human user’s primary session.
  • Issue short-lived tokens with explicit scopes for one SaaS action or workflow stage.
  • Bind approval to intent, such as “create ticket” or “read invoice,” not to a broad role.
  • Log every token issuance, scope, and downstream SaaS action for audit and revocation.
  • Rotate and revoke secrets automatically when the task ends or policy changes.

This approach also reduces blast radius when the agent is tricked into chaining tools or over-collecting data, which is why guidance from Salesloft OAuth token breach and BeyondTrust API key breach remains relevant to agent design. These controls tend to break down when the SaaS application only supports coarse session delegation, because the platform cannot express task-level scopes cleanly.

Common Variations and Edge Cases

Tighter delegated access often increases operational overhead, requiring organisations to balance agent agility against review, policy, and integration cost. That tradeoff is real, especially in older SaaS environments where app-level scopes are coarse, SCIM or OIDC support is uneven, or admins still rely on shared service accounts. Best practice is evolving, but there is no universal standard for agent login delegation yet, so teams should document compensating controls where native support is limited.

For high-risk workflows, add step-up approval, separate privilege tiers, and stronger revocation triggers. For lower-risk reads, use narrower scopes and shorter TTLs. In environments with multiple agents, workload identity becomes essential because it distinguishes one autonomous entity from another, which helps teams avoid flattening all agent activity into a single service principal. That distinction is central to the direction of Ultimate Guide to NHIs — 2025 Outlook and Predictions and the NIST AI Risk Management Framework.

Where the environment requires persistent background access, teams should treat that as an exception, not the default, and add compensating monitoring, IP restrictions, and continuous reauthorisation. The hard edge case is legacy SaaS that cannot separate human and agent sessions, because then the least-bad option may be a tightly constrained proxy identity with aggressive logging rather than true per-task delegation.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A1 Agent tool abuse and overbroad access are core risks here.
CSA MAESTRO MAESTRO focuses on agentic threat modeling and runtime control.
NIST AI RMF AI RMF governs accountability for autonomous agent behaviour.

Design SaaS access so each agent action is scoped, time-bound, and revalidated at request time.