Open
Description
This is not an Agents SDK bug. This is for visibility.
When Consent is required during SSO, Teams displays Cancel
and Consent
buttons. If the User clicks Cancel
, Teams ends the SSO, but does not send notification to the Agent.
This leaves the Agent OAuth Flow in an "active" state. However, if the user sends messages OAuth flow will try and OAuth Exchange (the magic code path), but of course that will fail. It will error out after the OAuthSettings.InvalidSignInRetryMax
value (default of 2).
If the User clicks Consent
, then cancels or close that popup, we get a signin/verifystate
Activity, with a Value of UserCancelledSignIn
and end the OAuth Flow properly.