OfficeDev / Microsoft-Teams-Samples

Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!
MIT License
1.01k stars 772 forks source link

does sample support in Gallatin cloud? #1389

Closed swiftPeter closed 1 month ago

swiftPeter commented 1 month ago

For the samples/tab-ui-templates/ts, I tried to upload in Gallatin cloud, it shows as blank page.

Capture the HAR, I got the error code:

image

{ "error": "invalid_resource", "error_description": "AADSTS500011: The resource principal named https://outlook.office.com/ was not found in the tenant named Test_Test_apgcTeams. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant. Trace ID: 2b050f10-e13b-4d31-9cf2-e4a116ce0c00 Correlation ID: 79052faa-1247-40d3-980f-776b21cd5a7e Timestamp: 2024-09-11 08:14:36Z", "error_codes": [ 500011 ], "timestamp": "2024-09-11 08:14:36Z", "trace_id": "2b050f10-e13b-4d31-9cf2-e4a116ce0c00", "correlation_id": "79052faa-1247-40d3-980f-776b21cd5a7e", "error_uri": " https://login.partner.microsoftonline.cn/error?code=500011" }

there is no issue when I deploy the sample to Global cloud, my question is "does sample support in Gallatin cloud"?

swiftPeter commented 1 month ago

In the global cloud, I did not receive token error:

image

Prasad-MSFT commented 1 month ago

Hi @swiftPeter, Cross-cloud communication via SDK is not allowed due to security reasons, therefore Teams Gallatin domain is not added 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"]);
swiftPeter commented 1 month ago

Can you add those information in the sample? Does Microsoft have any plan to make the sample code adapt for Gallatin and other nation cloud?

Prasad-MSFT commented 1 month ago

Sure @swiftPeter, we will add this info in the sample. Apologies, but currently there is no plan regarding this. We recommend you give your feedback in Teams Feedback Portal.

Also, could you please share your valuable feedback via Microsoft Teams Developer Community Response Feedback link?

Prasad-MSFT commented 1 month ago

Doc update request: https://github.com/MicrosoftDocs/msteams-docs/issues/11505

ChetanSharma-msft commented 1 month ago

We are closing this issue for now, please feel free to reopen it, if required.

microsoft-github-policy-service[bot] commented 1 month ago

Tell us about your experience!

Hi @swiftPeter! This issue is closed in our system. We would like your feedback on your experience with our support team and Platform.

Best regards, Teams Platform