Skip to content

How to access incoming OAuth Token? #599

@ashishmundra4001

Description

@ashishmundra4001

I have a API - lets say API A, which will call Agent (Foundry Hosted Agent).

The Agent code is the most basic written using python agent framework and uses Hosting Adapter, it has a chatClient as agent - and uses - from_agent_framework(agent).run()

This Agent must call another API, lets say API B which requires OAuth token as well, but this OAuth must be a OBO (on-behalf-of token) to preserve initial API A user identifier in original token.

To create a OBO token, Agent A will require to get access to token sent in Authorization Header otherwise how will it create OBO using original incoming token.

So, in Agent A, how do I access the original OAuth Token in agent_framework?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions