Add BotRequestContext overloads to UserTokenClient#591
Merged
heyitsaamir merged 2 commits intoJul 6, 2026
Merged
Conversation
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>
singhk97
approved these changes
Jul 6, 2026
0f2e8b3
into
heyitsaamir-agentic-identity-defaults
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a
BotRequestContext?overload to everyUserTokenClientoperation — token status, get token, sign-in URL/resource, exchange, sign out, and AAD tokens — alongside the existing plain overloads.BotRequestContextis the canonical per-request context; callers holding anAgenticIdentityconvert with the publicBotRequestContext.FromAgenticIdentity(...). So each operation exposes just two overloads (original +BotRequestContext?) rather than a thirdAgenticIdentity?convenience overload.This is the core-only slice extracted from #589, so the higher-level
Microsoft.Teams.Appschanges can follow separately. Stacked on #587 (base branchheyitsaamir-agentic-identity-defaults).Includes a unit test for the
BotRequestContext?overload (verifies bothAgenticIdentityandBotAppIdare 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.