Closed shuaixy closed 2 months ago
Hi @shuaixy - Could you please provide more details on your issue? Any code snippet where you are encountering this issue along with repro video would be really helpful. Is this happening in MS Teams desktop client and web client both? and is this specific to any version? Please do share Teams version aswell.
The global version of Teams works perfectly fine, but the problem occurs with the Chinese version. The issue exists on both the web and desktop versions.
@shuaixy, we have raised a bug for this issue. We will inform you once we get any further update from engineering team.
Thanks!
Hi @shuaixy , we got response from engineering team stating that, for security reasons we do not want to allow cross-cloud communication via the SDK so we have intentionally not added the Teams Gallatin domain to the validOrigins. If an app wants to work in Gallatin, it needs to explicitly specify the Gallatin domain when initializing the SDK in the Gallatin deployment of their apps (using the validMessageOrigins parameter): https://learn.microsoft.com/en-us/javascript/api/@microsoft/teams-js/app?view=msteams-client-js-latest#@microsoft-teams-js-app-initialize
That would look something like this:
import { app } from '@microsoft/teams-js';
app.initialize(["https://teams.microsoftonline.cn"]);
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.
Type of issue
Code doesn't work
Feedback
执行:microsoftTeams.app.initialize(); 控制台:Error: SDK initialization timed out.
Page URL
https://learn.microsoft.com/zh-cn/microsoftteams/platform/tabs/how-to/using-teams-client-library?tabs=javascript%2Cmanifest-teams-toolkit
Content source URL
https://github.com/MicrosoftDocs/msteams-docs/blob/main/msteams-platform/tabs/how-to/using-teams-client-library.md
Author
@erikadoyle
Document Id
4ae8187e-a7e4-4b5a-6f38-da6bfa30f2d2