Forum Discussion

zhy_qian's avatar
zhy_qian
Copper Contributor
Dec 03, 2021

Problems with teams desktop calling Microsoft Teams JavaScript client SDK

Please refer to the following URL for the SDK used:

https://docs.microsoft.com/en-us/javascript/api/overview/msteams-client?view=msteams-client-js-latest https://docs.microsoft.com/en-us/javascript/api/@microsoft/teams-js/?view=msteams-client-js-latest


I use the Microsoft Teams JavaScript client SDK to authenticate programs.

In the browser's teams, the pop-up window will pop up normally during identity authentication.

However, when performing identity authentication in the teams desktop, the pop window does not pop up in the teams, but calls the IE browser of windows. This caused a problem with my program.

 

Debug the code:

After executing [initialize()], the SDK does not recognize the desktop environment.(Unrecognized host Client Type)

Caused the default browser to be called when executing [authentication]

What is the reason for this?

Is my initialization incorrect?

9 Replies

    • zhy_qian's avatar
      zhy_qian
      Copper Contributor

      Meghana-MSFT 

      I am trying the tab authentication
      Please refer to the picture in the attachment for the code.

      In the desktop of teams, when executing the code shown in the attachment, the code does not recognize the current execution environment of the application.(During the observation of the source code, it is found that the value of "hostClientType" is undefined).

      As a result, the internal browser of teams desktop is not opened, but the local IE browser is opened.

      Opening the local IE browser will cause errors in my application.

      Does the team desktop have a built-in browser? And please help check whether the code is correct.

      Thank you.

Resources