OAuthInput does not work from within MS Teams chat context
See original GitHub issueVersion
4.10.0
Describe the bug
OauthInput for AdaptiveDialog is not working in MS Teams
To Reproduce
Steps to reproduce the behavior:
- Implement OAuthInput dialog to connect to a Generic Oauth provider using bot service
- Test locally, works
- Test remote using webchat, works
- Deploy in Teams using manifest
- Card shows to sign in, clicking the sign-in button doesn’t prompt any login / pop-up whatsoever, no message no nothing
Expected behavior
I’d expect the bot to behave the same as when using webchat, and thus display a prompt to login to the generic OAuth provider.
Additional context
Code snippet for the Oauth dialog creation, there’s not much more to it:
_oauthDialog = new OAuthInput()
{
ConnectionName = configuration["ConnectionName"],
Title = "Sign in",
Text = "Please sign in using OAuth",
Property = "user.authToken"
};
Maybe this bug belongs to MS Teams instead, I’m not sure and I have no way of telling it does I guess.
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Teams App Message Extension not working in Chat Context
Hi, We are seeing "Something went wrong. Please try again." when opening message extension in the new chat window context by selecting the...
Read more >Teams - Right Click Context Menu not coming up
Hello, I've got a strange issue in teams. Right clicking in the "Type a new message" field in teams isn't working, the context...
Read more >Right-Clicking Chat Field & Spell Checking Not Working
When right-clicking a chat field to receive a spell-checking suggestion or right-clicking to paste, no right-click menu appears. If you close ...
Read more >Show context around old Teams messages from search ...
Looking for help with a particular issue with searching for older messages inside of Teams. When I search for a certain keyword -...
Read more >Teams messages search function does not show full ...
Teams messages search function does not show full conversation. When using the search function in Teams chat, is there a way to see...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jsiegmund
Unfortunately, we have duplicate code in OAuthInput and OAuthPrompt, and it has diverged.
Those same lines in OAuthPrompt have been updated as follows: https://github.com/microsoft/botbuilder-dotnet/blob/main/libraries/Microsoft.Bot.Builder.Dialogs/Prompts/OAuthPrompt.cs#L401
This same code should be in OAuthInput. I’ve raised this issue: https://github.com/microsoft/botbuilder-dotnet/issues/4467 to track.
We have the same Issue. When comparing the versions 4.9 and 4.10 of the OAuthInput.cs you will notice that in the method “ChannelSupportsOAuthCard” in version 4.10 the case statemant “case Channels.MSTeams” is no longer present. This leads to the fact that the Card is not generated as in 4.9, but is loaded from a resource. After we have reintroduced the mentioned case statemant, the MS-Teams login works again as expected. Probably something is wrong with the loaded card resource.