Forum Discussion
Problems with teams desktop calling Microsoft Teams JavaScript client SDK
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.
zhy_qian - Could you please go through the following code sample and verify your code - Code sample
- zhy_qianDec 20, 2021Copper Contributor
Hello, thank you very much for your reply. I refer to the sample code.
The authentication code is roughly the same.
Execute "microsoftTeams.initialize()" code first, and then execute "microsoftTeams.authentication.authenticate()" for authentication.
However, in my code, after the "microsoftTeams.initialize()" code is executed, debug the source code of "microsoftTeams.authentication.authenticate()". It is found that the value of "hostClientType" in the code does not exist.
If I can't call the internal browser of Teams desktop, it will affect my application.
Is there a solution?
- Meghana-MSFTDec 21, 2021Former Employee
zhy_qian - Please check the below code sample where we are getting hostClientType.
- zhy_qianDec 27, 2021Copper ContributorThank you very much.
I have found a solution to the problem that [hostclienttype] cannot be set before, but it has not solved my problem. The previous team client will open the page of the specified website through the browser, and the main page of the team client will directly call the [failurecallback] method that will be called back when the pop-up window is closed.
After the value of [hostclienttype] is set correctly, the team client does not pop up the pop-up page, and directly calls the [failurecallback] method that will be recalled when the pop-up window is closed, but the browser version of teams can pop up the pop-up window normally.
Is there any solution for the team client to call its internal browser pop-up window to pop up the page of the specified website.