Updates from: 01/31/2023 06:07:52
Service Microsoft Docs article Related commit history on GitHub Change details
platform Build Tabs For Meeting https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/build-tabs-for-meeting.md
Title: Build tabs for meeting
-description: Learn how to build a tabs for a meeting chat, meeting side panel, and meeting stage in Microsoft Teams meeting.
+description: Learn how to build a tab for a meeting chat, meeting side panel, and meeting stage in Microsoft Teams meeting.
ms.localizationpriority: high
The following image shows a tab added to the meeting details page in the Teams m
A public scheduled channel meeting has the same list of apps as its parent team. Installing an app to a channel meeting also makes it available in the parent team, and vice versa.
-However, the tab instances in a channel meeting are separate from the tabs in the channel itself. For example, suppose a *Development* channel has a *Polly* tab. If you create a *Standup* meeting in that channel, that meeting would not have a *Polly* tab, until you explicitly [add the tab to the meeting](#meeting-details-view).
+However, the tab instances in a channel meeting are separate from the tabs in the channel itself. For example, suppose a *Development* channel has a *Polly* tab. If you create a *Standup* meeting in that channel, that meeting wouldn't have a *Polly* tab, until you explicitly [add the tab to the meeting](#meeting-details-view).
# [Channel meeting desktop](#tab/channel-meeting-desktop)
TeamsJS is a rich library used to create Tabs using JavaScript. Use the latest T
Microsoft Teams JavaScript library exposes the frameContext in which your meeting tab URL is loaded in the getContext API. The possible values of frameContext are content, task, setting, remove, sidePanel, and meetingStage. This allows you to build customized experiences based on where the app renders. For example, showing a specific collaboration focused UI when in the `meetingStage` and a different meeting preparation UI in the chat tab (`content`). For more information, see [getContext API](/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=teamsjs-v2).
+## App caching
+
+App caching improves subsequent launch time of the apps that are loaded in the meeting side panel by allowing you to keep some resources and assets in memory that you can use when rehydrating app.
+
+> [!NOTE]
+>
+> * App caching is available only in [public developer preview](~/resources/dev-preview/developer-preview-intro.md).
+> * App caching is supported only for tabs loaded in the meeting side panel in Teams desktop client. While it can work in other contexts such as personal apps and chat or channel tabs, it isn't officially supported. We recommend to register the `onLoad` or `beforeUnload` handlers when in the sidePanel frameContext.
+
+### Enable app caching
+
+To enable app caching in your meeting side panel, follow the steps:
+
+1. Call `teamsCore.registerBeforeUnloadHandler` and `teamsCore.registerOnLoadHandler` APIs.
+
+1. Use `contentUrl` and `entityId` passed into the load handler to route to the correct page within your app and invoke `notifySuccess` or `notifyFailure` to notify Teams client that the app initialization flow is complete.
+
+ * [contentUrl](../tabs/how-to/create-tab-pages/configuration-page.md#modify-or-remove-a-tab): Add content page URL.
+ * [entityId](../tabs/how-to/create-tab-pages/configuration-page.md#modify-or-remove-a-tab): Add a unique identifier.
+
+1. Dispose resources and perform any cleanup needed in the `beforeUnload` handler, then invoke the `readyToUnload` callback to notify Teams client that the app unload flow is complete.
+
+The following is the flow diagram of the first launch of an app that wants to opt into app caching (register the `load` or `beforeUnload` on the first launch of the app):
++
+The following is the flow diagram of the launch of cached app:
++
+When you opt into app caching, the webview that is used to host the embedded app is reused as users navigate to different instances of the app within a window. The webview used to host the app is hidden when the users leave the app and shown when the users return to the app. When the app is cached, any audio that is playing is muted.
+
+> [!NOTE]
+> If the app caching isn't enabled, the webview is recreated every time the user launches the app.
+
+There are multiple reasons for an app to not get cached or for an app to get removed from the cache, some of the reasons are (numbers here are subject to change):
+
+* If the system memory load is high, the app is removed from the cache.
+* If the number of cached apps exceed the maximum cache size, the oldest cached app is removed from the cache.
+* If the user doesn't return to the app within 20 minutes, the app is removed from the cache.
+* The app isn't cached if Teams doesn't receive the `readyToUnload` signal from the app within 30 seconds after sending the `beforeUnload` notification.
+* App caching is disabled if the system memory is less than 4 GB or if the available memory is less than 1 GB on Windows or 512 MB on Mac.
+* Side panel is the only supported frameContext for app caching in meetings.
+* App caching isn't supported for meetings where the invited user count is more than 20.
+* If an app fails to load, the app isn't cached.
+
+### Code example
+
+The following code snippet is an example of `teamsCore.registerOnLoadHandler` and `teamsCore.registerBeforeUnloadHandler` APIs:
+
+```javascript
+microsoftTeams.teamsCore.registerOnLoadHandler((data) => {
+ console.log("got load from TEAMS", data.contentUrl, data.entityId);
+ // use contentUrl to route to correct page
+ // invoke notifySuccess when ready
+ app.notifySuccess();
+});
+
+microsoftTeams.teamsCore.registerBeforeUnloadHandler((readyToUnload) => {
+ // dispose resources and then invoke readyToUnload
+ readyToUnload();
+ return true;
+});
+```
+
+### Limitations
+
+The following are the limitations for app caching:
+
+* Single-page apps that use client-side routing for page navigation can benefit from app caching. It's recommended that the same domain be used across all contexts of your app launch.
+
+* Apps need to re-register for events such as `themeChange`, `focusEnter`, and so on, in the load handler. Teams client won't send any notifications to the app when cached. If your app requires notifications even when cached, caching might not be the right solution.
+
+* App caching is supported only in Teams desktop client. In Teams web client, even if the app registers load handlers, the app is removed from the cache after the unload sequence is completed.
+
+* Register the `load` and `beforeUnload` handlers early in your launch sequence. If the Teams client doesnΓÇÖt see these registrations before the user leaves the app, the app isn't cached.
+
+* The Teams client invokes the `loadHandler` only after the `unload` sequence of the app is completed. For example, if a user launches tab A of your app and then launches tab B of the same app, tab B won't get the load signal until the tab A invokes the `readyToUnload` callback.
+
+* Apps are cached on a per-window basis. App caching happens on a per app (not on a per tab) basis within the same window.
+
+* App caching isn't supported for the meeting stage or Task module contexts, because these can be opened on top of the tab and the same webview can't be used to render the content in the tab and the Task module.
+
+* Register only the `beforeUnload` handler if your app doesn't require app caching but needs time to safely save state (as leaving the app can cause the app content to be abruptly removed from the Document Object Model (DOM)). If the app hasn't registered for the `load` event, it's removed from the DOM after the unload flow completes.
+
+* Follow the guidelines in this section to onboard your app to app caching in Teams meeting. For app caching support only in meetings, register the `load` or `beforeUnload` handlers if the context is `sidePanel`.
+
+* Apps are expected to sleep when cached (use minimal compute or network resources and minimizes SDK requests). All the register handlers and the following SDK requests are allowed when the app is cached:
+
+ * `initialize`
+ * `notifyappLoaded`
+ * `notifySuccess`
+ * `notifyFailure`
+ * `notifyExpectedFailure`
+ * `getContext`
+ * `getAuthToken`
+ * `readyToUnload`
+ * `getConfig/getSettings`
+
+### Troubleshooting
+
+**Apps are not being cached? Why is load handler not invoked on subsequent navigation?**
+
+* Verify if the system and available memory constraints are met.
+
+* Reduce your memory footprint when cached. Use the `beforeUnload` handler to dispose resources, for example, release references and remove event listeners, that might not be needed when cached.
+ ## Feature compatibility by user types The following table provides the user types and lists the features that each user can access the tabs in meetings:
The following table provides the user types and lists the features that each use
|Sample name | Description | .NET | Node.js | |-|--|--|-| | Meeting app | Demonstrates how to use the Meeting Token Generator app to request a token. The token is generated sequentially so that each participant has a fair opportunity to contribute in a meeting. The token is useful in situations like scrum meetings and Q&A sessions. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-token-app/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-token-app/nodejs) |
-| Meeting stage sample | Sample app to show a tab in meeting stage for collaboration | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-stage-view/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-stage-view/nodejs) |
-| Meeting side panel | Sample app to show how to add agenda in a meeting side panel | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-sidepanel/csharp) |-|
+| Meeting stage sample | Sample app to show a tab in meeting stage for collaboration. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-stage-view/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-stage-view/nodejs) |
+| Meeting side panel | Sample app to show how to add agenda in a meeting side panel. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-sidepanel/csharp) | NA |
| In-meeting notification | Demonstrates how to implement in-meeting notification using bot. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-content-bubble/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-content-bubble/nodejs) |
-| In-meeting document signing | Demonstrates how to implement a document signing Teams app. Includes sharing specific app content to stage, Teams SSO and user specific stage view. | [View](https://github.com/officedev/microsoft-teams-samples/tree/main/samples/meetings-share-to-stage-signing/csharp) | NA |
+| In-meeting document signing | Demonstrates how to implement a document signing Teams app. Includes sharing specific app content to stage, Teams SSO, and user specific stage view. | [View](https://github.com/officedev/microsoft-teams-samples/tree/main/samples/meetings-share-to-stage-signing/csharp) | NA |
+| App caching | Sample app to show how app caching works in the meeting side panel. | NA | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-cache-meetings/nodejs) |
> [!NOTE] >
platform Notification Bot In Teams https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/bots/how-to/conversations/notification-bot-in-teams.md
If you select HTTP trigger, the scaffolded notification API doesn't have authent
* Use an API key. You can use [function access keys](/azure/azure-functions/security-concepts?tabs=v4#function-access-keys), if you select Azure Functions to host your notification bot.
-* Use an access token issued by Azure Active Directory (Azure AD).
+* Use an access token issued by Azure Active Directory (Azure AD). For more information, see [Configure SSO for your bot in Azure AD](../authentication/bot-sso-register-aad.md).
There can be more authentication or authorization solutions for an API, you can select as required.
platform App Fundamentals Overview https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/app-fundamentals-overview.md
The following table includes Teams features and availability for GCC, GCC-High,
| 3P or third-party apps | ✔️ Third-party apps are available. Disabled by default and tenant admin use their own discretion to enable it. | ❌ | ❌ | | Bots | ✔️ | ✔️ | ❌ | | Custom or Lob tab apps | ✔️ | ✔️ | ✔️ |
-| Sideloading apps | ✔️ | ✔️ | ❌ |
+| Sideloading apps | ✔️ | ❌ | ❌ |
| Custom or Lob bots | ✔️ | ✔️ | ❌ | | Custom message extensions | ✔️ | ✔️ | ❌ | | Custom connectors | ✔️ | ❌ | ❌ |
platform Teamsfx SDK https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/toolkit/TeamsFx-SDK.md
Title: TeamsFx SDK description: In this module, learn about TeamsFx SDK, core concepts and code structure, advanced Customization and scenarios-+ ms.localizationpriority: medium Last updated 11/29/2021
This section provides several code snippets for common scenarios that are relate
```typescript const authConfig: TeamsUserCredentialAuthConfig = {
- clientId: process.env.REACT_APP_CLIENT_ID,
- initiateLoginEndpoint: process.env.REACT_APP_START_LOGIN_PAGE_URL,
+ clientId: process.env.REACT_APP_CLIENT_ID!,
+ initiateLoginEndpoint: process.env.REACT_APP_START_LOGIN_PAGE_URL!,
}; const teamsUserCredential = new TeamsUserCredential(authConfig);
This section provides several code snippets for common scenarios that are relate
```typescript try {
- const graphClient = createMicrosoftGraphClientWithCredential(teamsUserCredential, ["User. Read"]); // Initializes MS Graph SDK using our MsGraphAuthProvider
+ const graphClient = createMicrosoftGraphClientWithCredential(teamsUserCredential, ["User.Read"]); // Initializes MS Graph SDK using our MsGraphAuthProvider
const profile = await graphClient.api("/me").get(); } catch (err: unknown) { // ErrorWithCode is handled by Graph client
platform Whats New https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/whats-new.md
Discover Microsoft Teams platform features that are in developer preview. You ca
Developer preview is a public program that provides early access to unreleased Teams platform features.
-**2022 November**
-
- ***November 10, 2022***: [Enable bots to receive all chat messages without being @mentioned.](bots/how-to/conversations/channel-messages-with-rsc.md)
+**2023 January**
- ***November 10, 2022***: [Generate a deep link to share content to stage in meetings.](concepts/build-and-test/share-in-meeting.md)
+***January 30, 2023***: [Enable app caching to improve subsequent launch time of the apps to the meeting side panel](apps-in-teams-meetings/build-tabs-for-meeting.md#app-caching).
:::column-end::: :::row-end::: | **Date** | **Update** | **Find here** | | -- | | |
+|05/12/2022| Introduced share in meeting to share any document or third-party app to the meeting stage.|Build apps for Teams meetings and calls > Enable and configure apps for meetings > [Share in meeting](concepts/build-and-test/share-in-meeting.md) |
|10/11/2022| Enable bots to receive all chat messages without being @mentioned.|Build bots > Bot conversations > Message in bot conversations > [Receive all conversation messages with RSC](bots/how-to/conversations/channel-messages-with-rsc.md) | |10/11/2022|Generate a deep link to share content to stage in meetings.|Build apps for Teams meetings and calls > Enable and configure apps for meetings > Share in meeting > [Generate a deep link to share content to stage in meetings.](concepts/build-and-test/share-in-meeting.md) | | 09/23/2022 | Introduced meeting app support for Scheduled Channel Meetings. | Build apps for Teams meetings and calls > [Apps for Teams meetings and calls](apps-in-teams-meetings/teams-apps-in-meetings.md) |