oAuth not working in Teams

Brass Contributor

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'.

voonsionglum_0-1652256305013.png

 

Clicking on "Sign In" opens a new tab on the browser, where we were asked to login and then grant consent.

voonsionglum_1-1652256408754.png

 

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.

voonsionglum_2-1652256458049.png

 

voonsionglum_3-1652259368157.png

In Teams, however, we get the oAuth prompt card, but the SignIn button gives the following error

voonsionglum_4-1652259429598.png

 

Based on https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service...and https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/authentication/add-authenticati... 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

voonsionglum_5-1652259558900.png

 

However, our manifest is already carrying the required value.

voonsionglum_6-1652259606926.png

 

We have also seen the techcommunity post at https://techcommunity.microsoft.com/t5/teams-developer/in-which-scenario-quot-webapplicationinfo-quo... where oAuth is working without validDomains being configured.  

 

Does anyone have any idea why oAuth is not working for us?

 

Thank You

 

5 Replies
@voonsionglum-We are looking into this I will get back to you soon.
Thank 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.
@voonsionglum- Glad to hear that your issue is resolved. We have asked engineering team for confirmation. We will update you.
@voonsionglum- If the user makes an app related change such as install or uninstall app or visits apps store 4 hours after the last update or re-login to Teams, the app definitions updates will show up on web & desktop client. If none of the above actions are taken, it takes up to 7 days for the cache to refresh. We have a change in flight which will reduce the 7 days period to a lesser and more deterministic timeframe.
Thanks for the information!