Javascript functions not working in New Teams Tab App

Copper Contributor

After switching to New Teams, Alert and Confirm javascript functions do not work.

Note: Alert and Confirm functions works in Teams Classic version.

6 Replies

@Vaibhavi2495 - Could you please provide more details on your issue? Please provide the code snippets or SDK references

Hi @Prasad_Das-MSFT ,


We are using basic JavaScript function "confirm( )" in our teams embedded tab web app. It is working fine in older version of MS Teams, But it is not working in the new  Teams Desktop Version 23335.232.2637.4844


I have attached the MS Teams App Package Zip file for your reference.


Here is my one line of code of my embedded page:

<input type="button" value="Are you sure?" onclick="javascript&colon;confirm('Hey CONFIRM is working!!')"/>


Thanks in advance,


@Vaibhavi2495 - We tested the app both in Legacy Teams and New Teams (Both in Desktop and Web client) and observed below behaviour.

In Teams Classic (Legacy): (Both Desktop and Web): It works fine


In New Teams: In web client it works fine, but in Desktop clients it doesn't work.
Web Client:


Desktop Client:


Is it working for you in web client (New Teams). Could you please confirm?




Yes, it works fine in Web browser but not in desktop app.


We are expecting it to work in desktop app as well.

@Vaibhavi2495 - Thanks for confirming. We have raised a bug for the same. We will inform you once we get any further update from engineering team. 





Prasad Das


If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.

Hello @Vaibhavi2495 
Regarding alert/confirm/prompt dialogs


We got an update from engineering team that:  

The alert/confirm/prompt dialogs provide a subpar user experience and present a security risk since they can be used by apps to spoof the user. We are not planning to make these APIs work in New Teams and Chromium-based browsers are on a path to deprecating this functionality too:

Please either render inline dialogs within their frame or launch a Task Module (aka Dialog):


We have raised one bug also to add a note in the documentation:

[Documentation Update] disallow window.{alert, confirm, prompt} from a cross-origin iframe · Issue #...