TL;DR: OAuth 2.1 removes the implicit and password grants, requires PKCE for all authorization code flows, and tightens redirect URI matching while encouraging refresh token rotation, according to Descope. Those changes matter because delegated access for AI agents and MCP servers still depends on assumptions about stable, reviewable sessions that modern attack paths routinely break.
At a glance
What this is: Descope’s analysis argues that OAuth 2.1 reduces delegated-access risk for AI agents and MCP servers by tightening flow rules, redirect handling, and token reuse behaviour.
Why it matters: IAM and NHI teams need to treat OAuth 2.1 as a governance baseline for agentic access because the protocol now codifies controls that reduce code interception, token replay, and over-broad delegation.
Context
OAuth 2.1 is a security-focused update to delegated authorization, not a full redesign. It removes older flows that exposed credentials or tokens unnecessarily, and it formalises practices that were previously left to library defaults or implementation discipline.
For AI agents and MCP servers, that shift matters because delegated access is the control plane for tool use. When the authorization pattern is weak, the risk is not only user-account compromise but also agentic misuse of scoped access across connected systems.
Key questions
Q: What breaks when OAuth 2.0 still depends on implicit or password grants?
A: Those flows expose tokens or credentials in ways that are hard to reconcile with MFA, SSO, and modern browser security. They also make third-party clients responsible for handling secrets they should never see. In practice, that increases the chance of leakage, replay, and over-broad delegation in agentic and non-agentic apps alike.
Q: Why do AI agents and MCP servers increase the importance of OAuth hardening?
A: AI agents depend on delegated access to tools and data, so weak OAuth choices directly become tool-use risk. If token scope, redirect handling, or refresh behaviour is loose, the agent can obtain broader or longer-lived access than the task justifies.
Q: How can security teams tell whether refresh token handling is actually safe?
A: The key signal is whether a stolen or replayed refresh token can still mint new access tokens after it has already been used once. If reuse is possible, the token behaves like standing privilege. Safe handling requires single-use rotation, invalidation on replay, and short-lived access token support.
Q: What is the difference between exact redirect matching and flexible redirect patterns?
A: Exact matching accepts only the pre-registered callback string, while flexible patterns allow wildcards or partial matches. The difference matters because flexible matching makes it easier to redirect authorization responses to unintended endpoints. Exact matching removes ambiguity and closes a common token leakage path.
Technical breakdown
Why PKCE becomes mandatory for authorization code flows
Proof Key for Code Exchange, or PKCE, binds the authorization response to the original client request by requiring a verifier at token exchange time. That closes the interception window that existed when authorization codes could be stolen and replayed by another party. In OAuth 2.0, PKCE was mainly framed for public clients such as mobile apps, but OAuth 2.1 makes it a baseline requirement across clients. For MCP-driven workflows, that matters because an agent may request access from a browser or embedded client while the real trust decision happens later at token issuance. Practical implication: treat PKCE as the default for every authorization code flow, not a special case for mobile or SPA implementations.
Practical implication: make PKCE non-optional in every authorization code implementation, including agent and MCP client flows.
How exact redirect URI matching removes a common token theft path
OAuth 2.1 replaces flexible redirect matching with exact string comparison. That removes wildcard and substring behaviour that attackers could exploit by steering responses to attacker-controlled or unintended destinations. In practice, loose redirect validation often turns a legitimate consent flow into an open redirect path that leaks codes or tokens. Exact matching shifts the burden to registration hygiene: every allowed redirect URI must be enumerated and enforced without ambiguity. For identity architects, this is less about cosmetic protocol tightening and more about eliminating an attack surface that was easy to misconfigure at scale. Practical implication: pre-register every redirect URI and reject any runtime deviation, however small.
Practical implication: inventory and lock down every redirect URI, then remove wildcard or pattern-based matching from authorization servers.
Why OAuth 2.1 removes the implicit and password grants
The implicit grant returned tokens directly to the browser, which increased exposure through history, fragments, and script access. The password grant pushed user credentials into the client application, creating a trust boundary that was hard to defend with MFA or modern SSO. OAuth 2.1 removes both because they encode assumptions that no longer fit current web and agentic architectures. For practitioners, the issue is not just old syntax being retired. It is that the protocol is moving away from patterns that make third-party clients custodians of secrets they should never see. Practical implication: retire flows that move tokens or passwords into the front channel or the client layer.
Practical implication: deprecate implicit and password grants in favour of authorization code flow with PKCE.
Threat narrative
Attacker objective: The attacker wants durable delegated access that looks authorised enough to move through API or MCP tooling without triggering credential prompts or obvious alarms.
- Entry occurs when an attacker intercepts or steals an authorization code or token from a weak OAuth flow, such as implicit delivery or loose redirect handling.
- Credential access follows when a reusable refresh token or exposed access token can be replayed to obtain new delegated permissions without the user’s involvement.
- Impact is achieved when the stolen delegation is used to call APIs or MCP tools on behalf of the user, preserving legitimate-looking access while bypassing intent.
Breaches seen in the wild
- CoPhish OAuth phishing via Copilot Studio: Datadog showed Copilot Studio agents on a Microsoft domain can front OAuth consent phishing and forward stolen tokens; no victims reported.
- Microsoft verified publisher OAuth phishing 2022: Malicious OAuth apps with a fraudulently obtained Microsoft verified publisher badge tricked UK users into granting mailbox access in 2022.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
OAuth 2.1 is really a governance update for delegated identity, not just a protocol refresh. The article’s core value is that it codifies the controls practitioners were already expected to implement, then removes flows that made weak implementations easy to ship. That matters because delegated access for AI agents and MCP servers is only as trustworthy as the authorization pattern behind it. The practitioner conclusion is straightforward: treat protocol choice as identity governance, not transport detail.
Refresh token rotation is the control that turns delegated access from durable privilege into bounded access. Reusable refresh tokens behave like standing credentials once they leave the intended session boundary. In agentic environments, that is especially risky because the same delegated identity may fan out across multiple tool calls and services. The practitioner conclusion is that token lifecycle design is now a primary governance decision, not a backend implementation preference.
Exact redirect matching exposes a broader identity assumption: authorization flows only work safely when the callback path is predictable. OAuth 2.0’s flexibility assumed that implementers would constrain redirects correctly, but that assumption failed repeatedly in real deployments. OAuth 2.1 therefore narrows the acceptable behaviour rather than expecting every client team to get the edge cases right. The practitioner conclusion is that callback hygiene belongs in the access-control model, not in a post-deployment checklist.
AI agents and MCP servers make OAuth’s weakest assumptions visible faster. These systems amplify delegated access because they rely on short-lived, scoped permissions across many tool interactions, often at machine speed. That does not make OAuth obsolete. It does mean organisations should stop treating agentic delegation as a novel exception and instead enforce the same identity controls more strictly across clients, redirects, and token reuse. The practitioner conclusion is to align agent access with the most restrictive OAuth posture available.
OAuth 2.1 sharpens the line between trusted delegation and convenient delegation. The protocol is moving away from features that optimised developer ease at the expense of predictable security outcomes. That shift validates a stricter identity posture for both human-facing apps and agentic workflows. The practitioner conclusion is that identity teams should use the draft as a forcing function to standardise on safer OAuth defaults now.
From our research library:
- 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, the protocol's first year of widespread adoption, according to the State of Secrets Sprawl 2026.
- Security researchers tracked consent phishing campaigns affecting 900 tenants and 3,000 user accounts in 2025.
- Read next: AI Agent Authorisation Guide
What this signals
Delegated access is becoming a stricter control plane for agentic systems. OAuth 2.1 pushes organisations away from flows that let tokens drift into browsers, clients, or loosely governed redirects. For IAM teams, the immediate question is not whether OAuth still works, but whether current implementations still assume a session can be reviewed after the fact. That assumption is increasingly fragile in MCP-connected environments.
OAuth 2.1 also raises the bar for protocol hygiene in ways that align with broader NHI governance. Access codes, refresh tokens, and redirect URIs now need lifecycle discipline comparable to other non-human credentials. In our research, 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, the protocol's first year of widespread adoption, according to the State of Secrets Sprawl 2026. The practical signal is that identity teams should inspect where agentic integrations still behave like long-lived trust relationships.
For practitioners
- Retire deprecated grant types Plan removal of implicit and password grants from any client that still depends on them, then migrate those integrations to authorization code flow with PKCE.
- Enforce exact redirect registration Require a pre-registered allow-list of exact redirect URIs for every client and remove wildcard or substring-based matching from authorization server policy.
- Make refresh token rotation mandatory Treat refresh tokens as single-use credentials, rotate them on every exchange, and invalidate replayed tokens immediately where platform support exists.
- Review MCP client delegation paths Check whether agent and MCP integrations depend on browser or embedded flows that still assume stable, reviewable sessions instead of scoped, short-lived delegation.
Key takeaways
- OAuth 2.1 reduces avoidable delegated-access risk by removing legacy OAuth patterns that were easy to misconfigure and hard to govern.
- For AI agents and MCP servers, the main issue is not authentication alone but whether delegated sessions remain bounded, reviewable, and resistant to replay.
- Identity teams should standardise on PKCE, exact redirect matching, and refresh token rotation as baseline controls rather than optional hardening.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-04 — Insecure Authentication | OAuth flow hardening reduces authentication weaknesses in delegated NHI and agent access. |
| NHI-07 — Long-Lived Secrets | Refresh token reuse creates durable delegated access that behaves like a long-lived secret. | |
| Recommendation — Map OAuth 2.1 adoption to NHI-04 and remove any client flow that still exposes tokens or passwords. Treat reusable refresh tokens as long-lived secrets and rotate or revoke them on every use. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Agentic tool access is governed by how delegated privileges are issued and constrained. |
| Recommendation — Constrain agent delegated access so privilege cannot be reused beyond the intended session scope. | ||
| MITRE ATT&CK | TA0006 — Credential Access | Stolen OAuth codes and tokens are credential-access paths that enable replay and session abuse. |
| Recommendation — Hunt for code interception and token replay patterns under TA0006 in OAuth-linked workflows. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | OAuth 2.1 changes how entitlements are granted, scoped, and enforced across clients and agents. |
| Recommendation — Review delegated entitlements under PR.AA-05 and eliminate any access path that is broader than required. | ||
Key terms
- Authorization Code With PKCE: An OAuth flow that protects the authorization code with a code verifier and challenge pair. For CLIs, it usually relies on a loopback redirect to bind the sign-in result to the same machine that started the login, which reduces code interception risk.
- Redirect URI Exact Match: Redirect URI exact match means the authorization server only accepts the specific callback URL that was pre-registered, with no wildcards or loose patterns. This removes ambiguity in where authorization responses are delivered and closes off a common route for open redirect and token misdelivery attacks.
- Refresh token rotation: Refresh token rotation replaces a reusable refresh token with a new one each time it is used. This limits the value of token theft because a stolen token becomes useless after the legitimate exchange, assuming the implementation handles revocation and concurrency correctly.
- Delegated Access: Delegated access is permission granted to one identity to act on behalf of another user, service, or system. In NHI environments, this usually appears in OAuth-connected apps and automation tooling. It is powerful, but it must be tightly scoped and reviewed because it can persist long after the original business need ends.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
Published by the NHIMG editorial team on July 6, 2026.
Updated on October 6, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org