-
Notifications
You must be signed in to change notification settings - Fork 306
Description
Version
4.12.0
Describe the bug
When performing a token exchange operation between a Host and a Skill, the Host intercepts the oAuthCard sent from the Skill and sends back the Activity with the TokenExchangeInvokeRequest value, returning a response of 412 status and a body of The bot is unable to exchange token. Proceed with regular login..
This issue occurs in BotFrameworkAdapter.exchange_token_from_credentials method when the UserTokenOperation.exchange_async method from BotFramework.Connector gets executed returning the BotFramework.Connector.TokenResponse, followed by a comparison against BotBuilder.Schema.TokenResponse using the isinstance function causing to differ and raise the error (Line#1270).
Another behavior that came up as part of this issue discovered, when the Adapter.process_activity returns the InvokeResponse (Line#512), the body (TokenExchangeInvokeResponse) is not serialized leaving the user to do it as part of the bot.
To Reproduce
Steps to reproduce the behavior:
- Use the DotNet Waterfall Host and the Python Waterfall Skill bot samples from the BotFramework-FunctionalTests repo.
- Configure the App Registrations required to test Sso. link.
- Use WebChat or Emulator for the host.
- Select
normaldelivery mode. - Select
Waterfallgroup. - Select
WaterfallSkillBotPythonskill. - Select the
Ssooption. - Login in the Host.
- Call the Skill with Sso.
- Select Login in the skill.
- It will not show the token and ask to SignIn.
- The ProcessActivityAsync executed in the SendTokenExchangeInvokeToSkillAsync will return a response of 412 status.
Expected behavior
- Resolve the correct
TokenResponseinstance comparing theexchange_asyncmethod result againstBotFramework.Connector.TokenResponseand notBotBuilder.Schema.TokenResponse. - Serialize the
InvokeResponsebody when theprocess_activitymethod gets executed.


