[oauth] add sso->oauth fall back in channels and attribute sign in failure invokes to sso in multi connection#605
Merged
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the SsoBot sample and associated SSO/OAuth documentation artifacts, while refining the OAuthFlow / Context OAuth APIs and the signin/failure routing logic to better attribute silent-SSO failures to the correct connection.
Changes:
- Remove the
SsoBotsample (project + sources + settings) and drop it fromcore.slnx. - Improve OAuth flow behavior and routing: omit token-exchange data in certain conversation contexts, and route
signin/failurevia a “pending SSO sign-in” resolver instead of “most recent sign-in”. - Update docs and samples to reflect the new/cleaned API surface; add unit tests for the updated sign-in card behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| core/test/Microsoft.Teams.Apps.UnitTests/OAuthFlowTests.cs | Adds tests validating whether OAuth cards include/omit tokenExchangeResource based on conversation type. |
| core/src/Microsoft.Teams.Apps/OAuth/OAuthFlowExtensions.cs | Changes signin/failure dispatch to resolve the flow with a pending SSO sign-in instead of “most recent sign-in”. |
| core/src/Microsoft.Teams.Apps/OAuth/OAuthFlow.cs | Adds pending-SSO tracking and adjusts OAuth card construction (conversation-type-based behavior). |
| core/src/Microsoft.Teams.Apps/Context.cs | Promotes GetConnectionStatusAsync as the generic status API (removes obsolete marker and simplifies flow selection). |
| core/samples/OAuthFlowBot/Program.cs | Updates the status command to use context.GetConnectionStatusAsync() instead of flow-specific status. |
| core/docs/sso/security-audit-oauthflow-2026-04-22.md | Removes the OAuthFlow-specific security audit document. |
| core/docs/sso/oauthflowbot-trace-2026-04-22-summary.md | Streamlines the trace summary by removing SsoBot comparison/bug-fix notes. |
| core/docs/sso/OAuthFlow-Design.md | Condenses and refreshes the OAuthFlow design documentation (including multi-connection routing notes). |
| core/core.slnx | Removes the SsoBot project from the solution. |
| core/samples/SsoBot/SsoBot.csproj | Deletes the SsoBot sample project. |
| core/samples/SsoBot/Program.cs | Deletes the SsoBot sample implementation. |
| core/samples/SsoBot/appsettings.json | Deletes the SsoBot sample configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closed
corinagum
reviewed
Jul 16, 2026
corinagum
reviewed
Jul 16, 2026
corinagum
approved these changes
Jul 16, 2026
corinagum
left a comment
Collaborator
There was a problem hiding this comment.
Approved pending links fix
singhk97
reviewed
Jul 16, 2026
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.
Code improvements and refactoring: