Skip to content

docs(guardrails): agent 365 end-to-end caller scenarios and sibling doc links - #1404

Merged
yucheng-berri merged 13 commits into
litellm_agent365_docsfrom
litellm_agent365_agent_identity_docs
Sep 15, 2026
Merged

yucheng-berri merged 13 commits into
litellm_agent365_docsfrom
litellm_agent365_agent_identity_docs

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reworks the Microsoft Agent 365 guardrail page (stacked on #1011, branch litellm_agent365_docs) around the workflow validated live against BerriAI/litellm#38241. The Agent Identity auth mode this PR used to document is gone: Agent 365 evaluates only in a signed-in user's context, so BerriAI/litellm#40568 was closed and the page now says plainly that a tool call without a user token is refused. config_settings.md keeps only the five AGENT365_* rows the code reads

The "End-to-end workflow" section now leads with the per-call sequence in the order the proxy actually runs it (LiteLLM admission first, then the Entra token gate, OBO exchange, evaluate, execute or 400), and follows with the four caller scenarios the flow diagram covers, each linking the sibling doc that owns the mechanism

  • A, applications on a proxy with enable_jwt_auth and Entra as issuer: the Entra token is both the LiteLLM credential and the OBO subject, no x-litellm-api-key; config and JWT_* env snippet, plus the aud api://<gateway_client_id> requirement (/docs/proxy/token_auth)
  • B, MCP clients (Claude Code, VS Code, Cursor) that follow the 401 + RFC 9728 challenge and sign the user in through the browser; notes that the challenge is issued on the per-server /mcp route, not the aggregate URL or the REST facade (/docs/mcp_oauth)
  • C, custom clients minting the token with az account get-access-token or MSAL and sending it next to the key (/docs/mcp_rest_api)
  • D, LiteLLM key only: admitted, then refused with 401 naming the guardrail, scoped to guarded servers so unguarded servers and LLM routes keep working

A "Two layers of authorization" subsection separates LiteLLM server/tool RBAC (/docs/mcp_control) from upstream document-level authorization, and points at oauth2_token_exchange (/docs/mcp_obo_auth) or per-user OAuth as the way to make the upstream see the signed-in user

Failure table: the "no bearer" row now says the WWW-Authenticate challenge is present on the /mcp transport only, and the caller-token row mentions wrong-audience tokens. The Logs paragraph links /docs/proxy/ui_logs and records the known gap that refused or blocked /mcp-rest/tools/call requests have no Logs row yet (BerriAI/litellm#40555)

The auth-mode section now says which MCP server auth_type values can carry the guardrail: those whose Authorization header is free for the Entra token (none, api_key, bearer_token, basic, token, aws_sigv4 without a conflicting header, and oauth2_token_exchange). Servers using passthrough or delegated oauth2 already occupy that header with an upstream or gateway token, so the guardrail cannot exchange it and the page tells admins not to attach it there

node scripts/check-writing-style.js passes on both files. Rendered preview: https://litellm-git-litellmagent365agentidentitydocs-clerkieai.vercel.app/docs/proxy/guardrails/microsoft_agent_365

Link to Devin session: https://app.devin.ai/sessions/ef78f05d83264d3f82b348e7cf32c165
Open in Devin Desktop: https://app.devin.ai/desktop/session/ef78f05d83264d3f82b348e7cf32c165?variant=devin
Requested by: @yucheng-berri


Note

Low Risk
Documentation-only changes to the Agent 365 guardrail guide; no runtime or security logic is modified in this diff.

Overview
Reworks the Microsoft Agent 365 guardrail doc around user-only OBO evaluation: drops any service/agent identity path and states plainly that calls without an Entra user token get HTTP 401.

How it works is reordered to match proxy behavior (LiteLLM admission → Entra token → OBO → Agent 365 evaluate → execute or block) and adds guidance on which MCP auth_type values can host the guardrail vs servers where Authorization is already used for upstream OAuth.

Prerequisites and Quick Start are tightened (including an az token snippet for curl). The old end-to-end narrative is replaced by Caller scenarios A–D (Entra JWT-as-LiteLLM-credential, browser MCP OAuth on per-server /mcp, self-minted tokens, LiteLLM-key-only refusal) plus two layers of authorization with links to sibling docs (token_auth, mcp_oauth, mcp_rest_api, mcp_control, mcp_obo_auth, ui_logs).

Failure behavior, browser sign-in, and logging sections are updated: WWW-Authenticate challenges only on per-server MCP routes (not aggregate /mcp or REST), consolidated 401 rows, and a note that /mcp-rest/tools/call refusals/blocks may lack Admin UI log rows (#40555).

Reviewed by Cursor Bugbot for commit 584e7bc. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
litellm Ready Ready Preview Sep 15, 2026 10:44pm UTC

Request Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 3 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

…nd cover both auth modes in overview

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…llm_agent365_agent_identity_docs

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	docs/proxy/guardrails/microsoft_agent_365.md
…llm_agent365_agent_identity_docs

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	docs/proxy/guardrails/microsoft_agent_365.md
… caller scenarios and sibling doc links

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title docs(guardrails): agent 365 agent identity auth mode and env keys docs(guardrails): agent 365 end-to-end caller scenarios and sibling doc links Sep 11, 2026
…ization header carries the Entra token

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

yucheng-berri and others added 2 commits September 14, 2026 22:31
…llm_agent365_agent_identity_docs

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	docs/proxy/guardrails/microsoft_agent_365.md
…n Agent 365 guardrails

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… in the agent 365 server list

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 584e7bc. Configure here.

@yucheng-berri
yucheng-berri merged commit cf57983 into litellm_agent365_docs Sep 15, 2026
4 checks passed
@yucheng-berri
yucheng-berri deleted the litellm_agent365_agent_identity_docs branch September 15, 2026 23:21
yucheng-berri added a commit that referenced this pull request Sep 16, 2026
* docs(guardrails): add Microsoft Agent 365 MCP guardrail page and env keys

* docs(guardrails): agent 365 fail_open covers only infrastructure failures

* docs(guardrails): agent 365 throttling blocks 503 regardless of fallback

* docs(guardrails): agent 365 tenant prework steps and end-to-end user workflow

* docs(guardrails): drop em dash from agent 365 workflow prose

* docs(guardrails): agent 365 browser sign-in challenge, tool metadata in payload, defender skipped handling

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): agent 365 default sign-in scope and gateway credential failures

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): show the route-matched Agent 365 sign-in challenge and metadata

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): group Agent 365 evaluations by MCP session and challenge only default-on guardrails

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): state which MCP server auth modes the Agent 365 guardrail can govern

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): note that the Agent 365 sign-in challenge exists only on single-server MCP routes

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): agent 365 end-to-end caller scenarios and sibling doc links (#1404)

* docs(guardrails): agent 365 agent identity auth mode and env keys

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): use typed Graph segments for agent identity setup and cover both auth modes in overview

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): replace agent 365 agent identity mode with the four caller scenarios and sibling doc links

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): agent 365 guardrail applies to servers whose Authorization header carries the Entra token

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): scope the scenario D sign-in challenge to default-on Agent 365 guardrails

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): name the authorization and oauth2_id_jag auth types in the agent 365 server list

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(guardrails): tighten the Agent 365 page to half its length

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: yucheng <yucheng@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
Preview — 584e7bc9 Deployed Sep 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants