Forum Discussion
oAuth not working in Teams
Hi,
We are currently trying to figure out why oAuth has stopped working for our Bot in Teams. We went back to the javascript_nodejs botbuilder-sample 46.teams-auth and deployed the code to a custom Bot in our Tenant.
In Web Chat, the sample is working. We get a welcome message and the oAuth card when we type in 'hi'.
Clicking on "Sign In" opens a new tab on the browser, where we were asked to login and then grant consent.
Once we click on Allow, we are presented a validation code, which we can enter in the Web Chat and get a successful sign in.
In Teams, however, we get the oAuth prompt card, but the SignIn button gives the following error
Based on https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=userassigned%2Caadv2%2Ccsharpand https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/authentication/add-authentication?tabs=dotnet%2Cdotnet-sample, it is said that the "Sign In" button won't work if the related Teams App Manifest does not have token.botframework.com in validDomains
However, our manifest is already carrying the required value.
We have also seen the techcommunity post at https://techcommunity.microsoft.com/t5/teams-developer/in-which-scenario-quot-webapplicationinfo-quot-nad-quot/m-p/3262237 where oAuth is working without validDomains being configured.
Does anyone have any idea why oAuth is not working for us?
Thank You
5 Replies
- Sayali-MSFT
Microsoft
voonsionglum-We are looking into this I will get back to you soon.- voonsionglumBrass ContributorThank You! I retested our app in Teams again today. Surprisingly, the Sign In button is now working on both Teams Web and Teams Desktop. I am starting to wonder if Teams require a "refresh" period to take the configured validDomains into account. Similar to the "Please allow 30 minutes for changes to bot settings to be reflected in all regions. Changes to icons may take up to 24 hours." message we get when we try to update the Bot profile in Azure, maybe the manifest's validDomains configuration also require time for the settings to kick-in?
It would be great if we can get confirmation from Microsoft.- Sayali-MSFT
Microsoft
voonsionglum- Glad to hear that your issue is resolved. We have asked engineering team for confirmation. We will update you.