Dec 03 2021 12:56 AM
Dec 03 2021 12:56 AM
Please refer to the following URL for the SDK used：
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?
Dec 07 2021 06:23 AM
Dec 15 2021 02:18 AM
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.
Dec 17 2021 06:44 AM
Dec 19 2021 06:56 PM
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?
Dec 21 2021 07:03 AM
@zhy_qian - Please check the below code sample where we are getting hostClientType.
Dec 22 2021 01:32 AM
Dec 26 2021 07:07 PM
Dec 27 2021 09:31 PM
@zhy_qian - Teams internal browser is a part of Microsoft Teams product. We do not have control over the internal browser to call/handle the events.