Skip to content

Add BotRequestContext overloads to UserTokenClient#591

Merged
heyitsaamir merged 2 commits into
heyitsaamir-agentic-identity-defaultsfrom
heyitsaamir-heyitsaamir-usertoken-core-overloads
Jul 6, 2026
Merged

Add BotRequestContext overloads to UserTokenClient#591
heyitsaamir merged 2 commits into
heyitsaamir-agentic-identity-defaultsfrom
heyitsaamir-heyitsaamir-usertoken-core-overloads

Conversation

@heyitsaamir

@heyitsaamir heyitsaamir commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

This adds a BotRequestContext? overload to every UserTokenClient operation — token status, get token, sign-in URL/resource, exchange, sign out, and AAD tokens — alongside the existing plain overloads.

BotRequestContext is the canonical per-request context; callers holding an AgenticIdentity convert with the public BotRequestContext.FromAgenticIdentity(...). So each operation exposes just two overloads (original + BotRequestContext?) rather than a third AgenticIdentity? convenience overload.

This is the core-only slice extracted from #589, so the higher-level Microsoft.Teams.Apps changes can follow separately. Stacked on #587 (base branch heyitsaamir-agentic-identity-defaults).

Includes a unit test for the BotRequestContext? overload (verifies both AgenticIdentity and BotAppId are stamped onto the outbound request options). All Core unit tests pass on net8.0 and net10.0; the Apps project still builds clean against the base overloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removes the AgenticIdentity? convenience overloads from UserTokenClient so
each operation exposes just the original overload plus a BotRequestContext?
overload. Callers holding an AgenticIdentity convert via the public
BotRequestContext.FromAgenticIdentity(...). Test updated to exercise the
BotRequestContext overload directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@heyitsaamir heyitsaamir merged commit 0f2e8b3 into heyitsaamir-agentic-identity-defaults Jul 6, 2026
1 check passed
@heyitsaamir heyitsaamir deleted the heyitsaamir-heyitsaamir-usertoken-core-overloads branch July 6, 2026 19:46
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