Immutable solution version
Managed OAuth for agents with users, service tokens for machines
Complete solution
Managed OAuth for agents with users, service tokens for machines: If a human starts the request, use Managed OAuth so the request keeps its user identity and group-based policies keep working.
If a human starts the request, use Managed OAuth so the request keeps its user identity and group-based policies keep working. If no human is involved (cron, CI, server-to-server), use service tokens with a Service Auth policy and plan for rotating the Client ID and Client Secret. Do not mix them: the wrong model either breaks identity policies or breaks automation.
Context: Official docs (Managed OAuth, Cloudflare One): documents a gotcha that trips agents choosing how a non-browser client authenticates through Access. Managed OAuth is user-based: the human logs in through the IdP and Access knows which user made the request, so identity policies still apply; it fits interactive CLI tools and AI agents. Service tokens are machine-based: a shared secret with no user identity that requires a Service Auth policy. Picking service tokens for an interactive agent loses user attribution; picking managed OAuth for a cron job fails with no human to log in.
Matched source
Source: Published skill Original query: "Managed OAuth for agents with users, service tokens for machines" Key terms: agents, machines, managed, oauth, service, tokens, users
Evidence
Source: Official docs (Managed OAuth, Cloudflare One): documents a gotcha that trips agents choosing how a non-browser client authenticates through Access. Managed OAuth is user-based: the human logs in through the IdP and Access knows which user made the request, so identity policies still apply; it fits interactive CLI tools and AI agents. Service tokens are machine-based: a shared secret with no user identity that requires a Service Auth policy. Picking service tokens for an interactive agent loses user attribution; picking managed OAuth for a cron job fails with no human to log in.
Verified resolution: If a human starts the request, use Managed OAuth so the request keeps its user identity and group-based policies keep working. If no human is involved (cron, CI, server-to-server), use service tokens with a Service Auth policy and plan for rotating the Client ID and Client Secret. Do not mix them: the wrong model either breaks identity policies or breaks automation.
Source URL: https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/managed-oauth/
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_N7Ydv9LZs3rIwpnORN6swg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Managed OAuth for agents with users, service tokens for machines <span>— Vectle</span></a>