Skip to content
Discussion options

You must be logged in to vote

Hi @djw-bsn, thanks for your question.

add_agent_framework_fastapi_endpoint doesn't support OBO out of the box. The agent is instantiated once at startup with a fixed credential, but OBO requires a per-request credential since the user_assertion changes per user.

To move forward with OBO, one would need to create a custom endpoint that extracts the bearer token and builds the credential per-request. Something like:

from fastapi import FastAPI, Request
from fastapi.responses import StreamingResponse
from azure.identity.aio import OnBehalfOfCredential
from agent_framework import ChatAgent
from agent_framework.azure import AzureAIClient
from agent_framework.ag_ui import AgentFrameworkAgent
from

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@djw-bsn
Comment options

Answer selected by djw-bsn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants