Service | Microsoft Docs article | Related commit history on GitHub | Change details |
---|---|---|---|
platform | Build Apps For Teams Meeting Stage | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/build-apps-for-teams-meeting-stage.md | description: Learn how to build apps for Teams meeting stage, share to stage API ms.localizationpriority: medium Previously updated : 04/07/2022 Last updated : 10/29/2024 # Build apps for Teams meeting stage In addition to screen sharing, Microsoft Teams offers various tools designed to The following table lists the scenarios to use Screen share and Share to stage features: -| Feature | Share to stage | Screen share content to stage | +| Feature | Share to stage | Screen share content to stage | | | | | | **Interaction Level** | Allows attendees to interact with the content. | View-only mode of the app or content. | | **Scenarios** | Collaborative experiences, such as whiteboarding. | Coconsumption scenarios, such as reviewing dashboards in a scrum meeting. | The following image shows the share to stage option in the Teams mobile client: Use the following APIs to share specific part of the app: -* **Share app content to stage**: Share specific parts of the app to meeting stage from the meeting side panel in a meeting. [TeamsJS library](/javascript/api/@microsoft/teams-js/meeting) --* **Get app content stage sharing state**: Fetch information about app's sharing state on the meeting stage. [TeamsJS library](/javascript/api/@microsoft/teams-js/meeting.iappcontentstagesharingstate) --* **Get app content stage sharing capabilities**: Fetch the app's capabilities for sharing to the meeting stage. [TeamsJS library](/javascript/api/@microsoft/teams-js/meeting.iappcontentstagesharingcapabilities) +| Method| Description | Source | +|||-| +| **Share app content to stage** | Share specific parts of the app to meeting stage from the meeting side panel in a meeting. | [TeamsJS library](/javascript/api/@microsoft/teams-js/meeting) | +| **Get app content stage sharing state** | Fetch information about app's sharing state on the meeting stage. | [TeamsJS library](/javascript/api/@microsoft/teams-js/meeting.iappcontentstagesharingstate) | +| **Get app content stage sharing capabilities** | Fetch the app's capabilities for sharing to the meeting stage. | [TeamsJS library](/javascript/api/@microsoft/teams-js/meeting.iappcontentstagesharingcapabilities) | # [Share app content to stage](#tab/app-content) The following code is an example of sharing app content to meeting stage view an * A sharing button is available on all meeting side panels for users with organizer or presenter roles. * Users can initiate sharing through a deep link or the Share in Meeting button. +## Get app content in meeting side panel ++The `sharing.history.getContent` API enables you to fetch the content shared in a meeting and display in the meeting side panel. ++When a meeting begins, the app, in which the content is shared, automatically opens the meeting side panel for the user who shared the content. You can call the `sharing.history.getContent` API to fetch a list of shared content and display it in the side panel, making it readily accessible. For an upcoming recurring meeting, where the app is already added, developers can call the API to get the latest content to be displayed in the app's side panel. ++The following code is an example to fetch shared content in the meeting side panel: ++```javascript +// Define an async function +async function fetchContentDetails() { + // Fetches a list of content details that was shared in the meeting + const contentDetails = await microsoftTeams.sharing.history.getContent(); ++ // Above content details can be used to hydrate the meeting side panel + // to share to meeting stage ++} +``` ++**Response payload parameters** ++The following table includes the response payload parameters: ++| Value | Type | Required | Description | +|||-|| +| `appId` | String | Yes | The ID of the app to be shared. | +| `title` | String | Yes | The title of the shared content. | +| `contentReference` | String | Yes | The content reference link of the shared content. | +| `threadId` | String | Yes | The conversation ID where the content was shared. | +| `author` | String | Yes | The ID of the user who shared the content. | +| `contentType` | String | Yes | The type of content shared. For sharing to Teams stage scenarios, this value must be `ShareToStage`. | ++**Response codes** ++The following table provides the response codes: ++| Response code | Description | +||| +| **200** | Meeting content details successfully retrieved. | +| **500** | Internal error. | +| **501** | API isn't supported in the current context.| ++For more information, see [sharing.history.getContent](/javascript/api/@microsoft/teams-js/sharing.history). + ## Build an in-meeting document signing app You can build an in-meeting app for enabling meeting participants to sign documents in real time. It facilitates reviewing and signing documents in a single session. The participants can sign the documents using their current tenant identity. |
platform | Deep Link Application | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/build-and-test/deep-link-application.md | description: Learn how to create deep links to an application and navigate using ms.localizationpriority: high Previously updated : 05/04/2023 Last updated : 09/27/2024 # Deep link to an application You can configure deep links to browse within your app in the following ways: * [Configure deep link to browse within your app manually](#configure-deep-link-to-browse-within-your-app-manually) * [Configure deep link to a tab using TeamsJS](#configure-deep-link-to-a-tab-using-teamsjs)+* [Configure deep link to navigate between tabs](#configure-deep-link-to-navigate-between-tabs) ### Configure deep link to browse within your app manually The query parameters are: > > * Deep link to a Teams application with encoded URI isn't supported in Outlook. -#### Configure deep link to a tab using TeamsJS +### Configure deep link to a tab using TeamsJS You can configure deep links in your app through TeamsJS to allow the app users browse different pages within your app. The following code demonstrates how to navigate to a specific entity within your Teams app: if (pages.isSupported()) { else { /* handle case where capability isn't supported */ } ``` -For more information about navigation within a tab app, see [navigate within a tab app](../../tabs/how-to/tab-navigation.md). For more information about using the pages capability, see [pages.navigateToApp()](/javascript/api/@microsoft/teams-js/pages?view=msteams-client-js-latest&preserve-view=true#@microsoft-teams-js-pages-navigatetoapp) and the [pages](/javascript/api/@microsoft/teams-js/pages?view=msteams-client-js-latest&preserve-view=true) namespace for other navigation options. If needed directly open a deep link using the [app.openLink()](/javascript/api/@microsoft/teams-js/app?view=msteams-client-js-latest&preserve-view=true#@microsoft-teams-js-app-openlink) function. +For more information about using the pages capability, see [pages.navigateToApp()](/javascript/api/@microsoft/teams-js/pages?view=msteams-client-js-latest&preserve-view=true#@microsoft-teams-js-pages-navigatetoapp) and the [pages](/javascript/api/@microsoft/teams-js/pages?view=msteams-client-js-latest&preserve-view=true) namespace for other navigation options. If needed directly open a deep link using the [app.openLink()](/javascript/api/@microsoft/teams-js/app?view=msteams-client-js-latest&preserve-view=true#@microsoft-teams-js-app-openlink) function. # [TeamsJS v1](#tab/teamsjs-v1) microsoftTeams.executeDeepLink(/*deepLink*/); ``` - The navigation behavior of a Teams app extended across Microsoft 365 Office is dependent on two factors: 1. The target that the deep link points to. The navigation behavior of a Teams app extended across Microsoft 365 Office is d If the Teams app is running within the host where the deep link is targeted, your app opens directly within the host. However, if the Teams app is running in a different host from where the deep link is targeted, the app first opens in the browser. +### Configure deep link to navigate between tabs ++The [pages](/javascript/api/@microsoft/teams-js/pages) capability of the TeamsJS library provides support for navigation between tabs within an app. Specifically, the [`pages.currentApp`](/javascript/api/@microsoft/teams-js/pages.currentapp) namespace offers a function `navigateTo(NavigateWithinAppParams)` to allow navigation to a specific tab within the current app and a function `navigateToDefaultPage()` to navigate to the first tab defined in the app's manifest. The following code illustrates how to navigate to a specific and default tab: ++# [Specific tab](#tab/specific) ++The following code illustrates how to navigate to a specific tab: ++```typescript +if (pages.currentApp.isSupported()) { + const navPromise = pages.currentApp.navigateTo({pageId: <pageId>, subPageId: <subPageId>}); + navPromise. + then((result) => {/*Successful navigation*/}). + catch((error) => {/*Failed navigation*/}); +} +else {/*Handle situation where capability isn't supported*/ + const navPromise = pages.navigateToApp({appId: <appId>, pageId: <pageId>}); + navPromise. + then((result) => {/*Successful navigation*/}). + catch((error) => {/*Failed navigation*/}); +} +``` ++# [Default tab](#tab/default) ++The following code illustrates how to navigate to the app's default tab: ++```typescript ++if (pages.currentApp.isSupported()) { + const navPromise = pages.currentApp.navigateToDefaultPage(); + navPromise. + then((result) => {/*Successful navigation*/}). + catch((error) => {/*Failed navigation*/}); +} +else {/*Handle situation where capability isn't supported*/} +``` ++++> [!NOTE] +> The tab app navigation is supported only in [new Teams client](/microsoftteams/platform/resources/teams-updates). ++#### Configure back button navigation ++When an app has multiple tabs, a user can use the Microsoft 365 host app's back button to go backwards through the navigational history. However, the history doesn't include the actions a user performs within a tab. If you want to enhance the back button experience, you can maintain your own internal navigation stack and configure a custom handler for back button selections. This can be accomplished through the `registerBackButtonHandler()` function in the [`pages.backStack`](/javascript/api/@microsoft/teams-js/pages.backstack) namespace. ++After you register the handler, it helps you to address the navigational request before the system takes action. If the handler is able to manage the request, it should return `true` so that the system knows no further action is necessary. If the internal stack is empty, it should return `false` so that the system can call the `navigateBack()` function instead and take the appropriate action. ++#### Return focus to host app ++After the user starts using elements within a tab, by default, the focus remains with the elements of your iFrame until the user selects outside of it. If the iFrame is a part of the user navigating with keyboard shortcuts (the Tab key or the F6 key), you can focus on the host app. You can focus on the host app by using the [`pages.returnFocus()`](/javascript/api/@microsoft/teams-js/pages#@microsoft-teams-js-pages-returnfocus) function. The `returnFocus()` function accepts a Boolean indicating the direction to advance focus within the host app; `true` for forward and `false` for backwards. Generally, forward highlights the search bar and backwards highlights the app bar. + ## Deep link to a chat with the application You can allow app users browse to a personal chat with the application by configuring the deep link manually using the following format: You can invoke Stageview through deep link from your tab by wrapping the deep li | Sample name | Description | .NET |Node.js| |-|-||-| | Deep link consuming Subentity ID | This sample shows how to use a deep link from a bot chat to a tab consuming the Subentity ID. It also shows deep links for:<br>- Navigating to an app<br>- Navigating to a chat<br>- Open a profile dialog<br>- Open a scheduling dialog |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs)|+| Tab app navigation | This sample shows how to navigate between tabs within the app. | NA | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-app-navigation/nodejs) | |
platform | Deep Link Workflow | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/build-and-test/deep-link-workflow.md | description: Learn how to create deep links to a specific task in Microsoft Team ms.localizationpriority: high Previously updated : 01/31/2023 Last updated : 10/29/2023 # Deep link to a workflow in Teams In this article, youΓÇÖll learn to create a deep link: * [To start a new chat](#deep-link-to-start-a-new-chat) * [To open a meeting scheduling dialog](#deep-link-to-open-a-meeting-scheduling-dialog) * [To start an audio-video call](#deep-link-to-start-an-audio-video-call-with-users)-* [To share content to stage in meetings](#generate-a-deep-link-to-share-content-to-stage-in-meetings) +* [To share content to stage in meetings](#deep-link-to-share-content-to-stage-in-meetings) * [To meeting side panel](#deep-link-to-meeting-side-panel) * [To join a meeting](#deep-link-to-join-a-meeting) else { /* handle case where capability isn't supported */ } ``` -## Generate a deep link to share content to stage in meetings +## Deep link to share content to stage in meetings -You can generate a deep link to [share the app to stage](~/apps-in-teams-meetings/enable-and-configure-your-app-for-teams-meetings.md#share-entire-app-to-stage) and to start or join a meeting. +To add a deep link to share content on stage, you need to have an app context. The app context allows the Teams client to fetch the app manifest and check if the sharing on stage is possible. The following is an example of an app context: ++`{ "appSharingUrl" : "https://teams.microsoft.com/extensibility-apps/meetingapis/view", "appId": "9ec80a73-1d41-4bcb-8190-4b9eA9e29fbb" , "useMeetNow": false }` ++The query parameters for the app context are: ++* `appID`: This is the ID that can be obtained from the app manifest. +* `appSharingUrl`: The URL, which needs to be shared on stage should be a valid domain defined in the app manifest. If the URL isn't a valid domain, an error dialog appears to provide the user with a description of the error. +* `useMeetNow`: This includes a Boolean parameter that can be either true or false. + * **True**: When the `useMeetNow` value is true and if there's no ongoing meeting, a new Meet now meeting will be initiated. When there's an ongoing meeting, this value will be ignored. ++ * **False**: The default value of `useMeetNow` is false, which means that when a deep link is shared to stage and there's no ongoing meeting, a calendar pop-up will appear. However, you can share directly during a meeting. ++Ensure that all the query parameters are properly URI encoded and the app context must be encoded twice in the final URL. Following is an example: ++```javascript +const appContext= JSON.stringify({ + "appSharingUrl" : "https://teams.microsoft.com/extensibility-apps/meetingapis/view", + "appId": "9cc80a93-1d41-4bcb-8170-4b9ec9e29fbb", + "useMeetNow": false +}); +const encodedContext = encodeURIComponent(appContext).replace(/'/g,"%27").replace(/"/g,"%22"); +const encodedAppContext = encodeURIComponent(encodedContext).replace(/'/g,"%27").replace(/"/g,"%22"); +``` ++A deep link can be launched either from the Teams web or from the Teams desktop or mobile client. ++# [Teams web](#tab/web) ++Use the following format to launch a deep link from the Teams web to share content on stage: ++`msteams:/l/meeting-share?deeplinkId={GUID}&fqdn={string}&lm=deeplink&appContext={json encoded app context}` ++Example: `https://teams.microsoft.com/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Atrue%257D` -For deep links to share content to stage, see [deep link to share content to stage in meetings](~/concepts/build-and-test/share-in-meeting.md#generate-a-deep-link-to-share-content-to-stage-in-meetings). +|Deep link|Format|Example| +|||| +|To share the app and open Teams calendar, when `useMeeetNow` is **false**, default.|`https://teams.microsoft.com/l/meeting-share?deeplinkId={deeplinkid}&fqdn={fqdn}}&lm=deeplink%22&appContext={encoded app context}`|`https://teams.microsoft.com/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Afalse%257D`| +|To share the app and initiate instant meeting, when `useMeeetNow` is **true**.|`https://teams.microsoft.com/l/meeting-share?deeplinkId={deeplinkid}&fqdn={fqdn}}&lm=deeplink%22&appContext={encoded app context}`|`https://teams.microsoft.com/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Atrue%257D`| ++# [Teams desktop or mobile](#tab/desktopmobile) ++Use the following format to launch a deep link from the Teams desktop or mobile client to share content on stage: ++`msteams:/l/meeting-share?deeplinkId={deeplinkid}&fqdn={fqdn}&lm=deeplink&appContext={encoded app context}` ++Example: `msteams:/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Atrue%257D` ++|Deep link|Format|Example| +|||| +|To share the app and open Teams calendar, when `useMeeetNow` is **false**, default.|`msteams:/l/meeting-share?deeplinkId={deeplinkid}&fqdn={fqdn}&lm=deeplink%22&appContext={encoded app context}`|`msteams:/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Afalse%257D`| +|To share the app and initiate instant meeting, when `useMeeetNow` is **true**.|`msteams:/l/meeting-share? deeplinkId={deeplinkid}&fqdn={fqdn}&lm=deeplink%22&appContext={encoded app context}`|`msteams:/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Atrue%257D`| ++++The query parameters are: ++* `deepLinkId`: Any identifier used for telemetry correlation. +* `fqdn`: `fqdn` is an optional parameter, which can be used to switch to an appropriate environment of a meeting to share an app on stage. It supports scenarios where a specific app share happens in a particular environment. The default value of `fqdn` is enterprise URL and possible values are `Teams.live.com` for Teams for Life, `teams.microsoft.com`, or `teams.microsoft.us`. ++> [!NOTE] +> For your app to pass validation, when you create a deep link from your website, web app, or Adaptive Card, use **Share in meeting** as the string or copy. ++You can generate a deep link to [share the app to stage](~/apps-in-teams-meetings/enable-and-configure-your-app-for-teams-meetings.md#share-entire-app-to-stage) and to start or join a meeting. ## Deep link to meeting side panel |
platform | Share In Meeting | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/build-and-test/share-in-meeting.md | description: Learn how to add the share in meeting button, which allows users to ms.localizationpriority: medium keywords: Share in Meeting Previously updated : 02/08/2023 Last updated : 10/29/2024 # Share in meeting The following image shows the **Share in meeting** button on the web app: :::image type="content" source="../../assets/images/share-in-teams-meeting/web-app.png" alt-text="Screenshot shows share in meeting button on the web app."::: -During the meeting, when a user selects the **Share in meeting** button from the third-party web app or document, it launches a deep link to the meeting stage and opens the app as a web view in the meeting stage. For the meeting participants to interact with third-party web app or document, they must have meeting extension of the app or document installed in their Teams client. If they don't have meeting extension, Teams prompts participants to install the meeting extension. --When you select the **Share in meeting** button, it launches a deep link to the meeting stage. The following is the deep link format: +During the meeting, when a user selects the **Share in meeting** button from the third-party web app or document, it launches a deep link to the meeting stage and opens the app as a web view in the meeting stage. The following is the deep link format: `msteams:/l/meeting-share?deeplinkId={GUID}&fqdn={string}&lm=deeplink&appContext={json encoded app context}` -For more information, see [generate a deep link to share content to stage in meetings](#generate-a-deep-link-to-share-content-to-stage-in-meetings). +## Prerequisites ++* For the meeting participants to interact with third-party web apps or documents, they must have a meeting extension of the app or document installed in their Teams client. If they don't have meeting extension, Teams prompts participants to install the meeting extension. +* To share the entire app to stage, you must configure `meetingStage` and `meetingSidePanel` as frame contexts in the [app manifest](../../resources/schem). Otherwise, meeting participants might not be able to view the content on stage. ## Enable share in meeting -The following are three different methods to enable share in meeting. You can use one of the methods depending on how much control you want on the **Share in meeting** buttons displayed on your web page: +The following are three different methods to enable share in meeting. You can use one of the methods depending on how much control you want on the **Share in meeting** buttons displayed on your webpage: # [Method 1](#tab/method-1) This method is the simplest way to display the share in meeting buttons with minimal customizations. You can customize the button styles, size, and languages. -You can scan your web page to locate any HTML elements with the class name of type `teams-share-in-meeting-button` and dynamically generate **Share in meeting** buttons in your page. +You can scan your webpage to locate any HTML elements with the class name of type `teams-share-in-meeting-button` and dynamically generate **Share in meeting** buttons in your page. 1. Add the `launcher.js` script on your webpage. Once the user initiates an instant meeting (Meet now), they can add participants :::image type="content" source="../../assets/images/integrate-with-teams/Screenshot-ofmeet-now-option-pop-up.png" alt-text="The screenshot is an example that shows an option to add participants and how to interact with the app."::: -To add a deep link to share content on stage, you need to have an app context. The app context allows the Teams client to fetch the app manifest and check if the sharing on stage is possible. The following is an example of an app context: --`{ "appSharingUrl" : "https://teams.microsoft.com/extensibility-apps/meetingapis/view", "appId": "9ec80a73-1d41-4bcb-8190-4b9eA9e29fbb" , "useMeetNow": false }` --The query parameters for the app context are: --* `appID`: This is the ID that can be obtained from the app manifest. -* `appSharingUrl`: The URL, which needs to be shared on stage should be a valid domain defined in the app manifest. If the URL isn't a valid domain, an error dialog appears to provide the user with a description of the error. -* `useMeetNow`: This includes a Boolean parameter that can be either true or false. - * **True**: When the `useMeetNow` value is true and if there's no ongoing meeting, a new Meet now meeting will be initiated. When there's an ongoing meeting, this value will be ignored. -- * **False**: The default value of `useMeetNow` is false, which means that when a deep link is shared to stage and there's no ongoing meeting, a calendar pop-up will appear. However, you can share directly during a meeting. --Ensure that all the query parameters are properly URI encoded and the app context has to be encoded twice in the final URL. Following is an example: --```javascript -const appContext= JSON.stringify({ - "appSharingUrl" : "https://teams.microsoft.com/extensibility-apps/meetingapis/view", - "appId": "9cc80a93-1d41-4bcb-8170-4b9ec9e29fbb", - "useMeetNow": false -}); -const encodedContext = encodeURIComponent(appContext).replace(/'/g,"%27").replace(/"/g,"%22"); -const encodedAppContext = encodeURIComponent(encodedContext).replace(/'/g,"%27").replace(/"/g,"%22"); -``` --A deep link can be launched either from the Teams web or from the Teams desktop or mobile client. --* **Teams web**: Use the following format to launch a deep link from the Teams web to share content on stage: -- `msteams:/l/meeting-share?deeplinkId={GUID}&fqdn={string}&lm=deeplink&appContext={json encoded app context}` -- Example: `https://teams.microsoft.com/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Atrue%257D` -- |Deep link|Format|Example| - |||| - |To share the app and open Teams calendar, when `useMeeetNow` is **false**, default.|`https://teams.microsoft.com/l/meeting-share?deeplinkId={deeplinkid}&fqdn={fqdn}}&lm=deeplink%22&appContext={encoded app context}`|`https://teams.microsoft.com/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Afalse%257D`| - |To share the app and initiate instant meeting, when `useMeeetNow` is **true**.|`https://teams.microsoft.com/l/meeting-share?deeplinkId={deeplinkid}&fqdn={fqdn}}&lm=deeplink%22&appContext={encoded app context}`|`https://teams.microsoft.com/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Atrue%257D`| --* **Teams desktop or mobile client**: Use the following format to launch a deep link from the Teams desktop or mobile client to share content on stage: -- `msteams:/l/meeting-share?deeplinkId={deeplinkid}&fqdn={fqdn}&lm=deeplink&appContext={encoded app context}` -- Example: `msteams:/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Atrue%257D` -- |Deep link|Format|Example| - |||| - |To share the app and open Teams calendar, when `useMeeetNow` is **false**, default.|`msteams:/l/meeting-share? deeplinkId={deeplinkid}&fqdn={fqdn}&lm=deeplink%22&appContext={encoded app context}`|`msteams:/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Afalse%257D`| - |To share the app and initiate instant meeting, when `useMeeetNow` is **true**.|`msteams:/l/meeting-share? deeplinkId={deeplinkid}&fqdn={fqdn}&lm=deeplink%22&appContext={encoded app context}`|`msteams:/l/meeting-share?deeplinkId={sampleid}&fqdn=teams.microsoft.com&lm=deeplink%22&appContext=%257B%2522appSharingUrl%2522%253A%2522https%253A%252F%252Fteams.microsoft.com%252Fextensibility-apps%252Fmeetingapis%252Fview%2522%252C%2522appId%2522%253A%25229cc80a93-1d41-4bcb-8170-4b9ec9e29fbb%2522%252C%2522useMeetNow%2522%253Atrue%257D`| --The query parameters are: --* `deepLinkId`: Any identifier used for telemetry correlation. -* `fqdn`: `fqdn` is an optional parameter, which can be used to switch to an appropriate environment of a meeting to share an app on stage. It supports scenarios where a specific app share happens in a particular environment. The default value of `fqdn` is enterprise URL and possible values are `Teams.live.com` for Teams for Life, `teams.microsoft.com`, or `teams.microsoft.us`. --To share the entire app to stage, in the app manifest, you must configure `meetingStage` and `meetingSidePanel` as frame contexts, see [app manifest](../../resources/schem). Otherwise, meeting attendees may not be able to see the content on stage. +To add a deep link to share content in meetings, see [deep link to share content to stage in meetings](deep-link-workflow.md#deep-link-to-share-content-to-stage-in-meetings). > [!NOTE] > For your app to pass validation, when you create a deep link from your website, web app, or Adaptive Card, use **Share in meeting** as the string or copy. |
platform | Share To Teams From Web Apps | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/build-and-test/share-to-teams-from-web-apps.md | Title: Embed Share to Teams on Web Apps description: Learn to add the Share to Teams embedded button on third-party websites, with a website preview, using launcher script and code samples. ms.localizationpriority: medium Previously updated : 07/22/2022 Last updated : 10/29/2024 # Share to Teams from web apps -Third-party websites can use the launcher script to embed Share to Teams buttons on their webpages. When you select Share to Teams button, it launches the Share to Teams experience in a pop-up window. This allows you to share a link directly to any person or Microsoft Teams channel without switching the context. +Share to Teams from web apps allows users to share content directly to a chat, channel, or meeting without switching context. Third-party websites can use the launcher script to embed the **Share to Teams** button on their webpages. When the user selects **Share to Teams**, the Share to Teams dialog appears and prompts the user to provide the required details to share the content. -The following image displays the pop-up window for Share to Teams preview experience: +The following image displays the dialog that appears when the user selects **Share to Teams**: ++By default, Share to Teams supports tagging users with @username and @everyone, and the tagged users receive notifications within Microsoft Teams when content is shared on Teams. > [!NOTE] > > * Only the desktop versions of Microsoft Edge and Google Chrome are supported.-> * Use of Freemium or guest accounts is not supported. +> * Usage of Freemium or guest accounts isn't supported. -You can also add link unfurling for the links shared through Share to Teams button hosted in web app, personal app or tab. For more information, see [link unfurling](~/messaging-extensions/how-to/link-unfurling.md). +You can also add link unfurling for the links shared through Share to Teams that are hosted in a web app, personal app, or tab. For more information, see [link unfurling](~/messaging-extensions/how-to/link-unfurling.md). -The following image displays the link unfurling experience through Share to Teams button: +The following image displays the link unfurling experience through Share to Teams: -This article guides you on how to create and embed a Share to Teams button for your website, craft your website preview, and extend Share to Teams for Education. +The content outlined here guides you on how to create and embed Share to Teams for your website, craft your website preview, and extend Share to Teams for Education. -See the following video to learn how to embed Share to Teams button: +The following video provides the basic steps on how to embed Share to Teams: <br> > [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/RE4vhWH] <br> -## Embed a Share to Teams button +<!--## Steps ++* Embed Share to Teams button on webpage. +* In the meeting tab, add additional logic to query shared content (new APIs to be built by Teams platform) and display the content within the tab experience. +* Allow users to present that content onto the meeting stage via the Share to Stage APIs. +* Notify users of shared content via link unfurling.--> ++## Embed Share to Teams ++There are two methods by which you can embed Share to Teams on your webpage. Based on the control you want on Share to Teams, you can use one of the following methods: ++# [Method 1](#tab/method1) ++This method shows the simple and basic way to embed Share to Teams where you can customize the button and its functionality based on your requirements: 1. Add the `launcher.js` script on your webpage. See the following video to learn how to embed Share to Teams button: <script async defer src="https://teams.microsoft.com/share/launcher.js"></script> ``` -1. Add an HTML element on your webpage with the `teams-share-button` class attribute and the link to share in the `data-href` attribute. +1. Add an HTML element on your webpage with `teams-share-button` in the `class` attribute and the link to share in the `data-href` attribute. ```html <div See the following video to learn how to embed Share to Teams button: </div> ``` - After completing this, the Teams icon gets added to your website. The following image shows the Share to Teams icon: + After configuration, the **Share to Teams** button gets added to your website. ++ * If you want a different icon size for the button, use the `data-icon-px-size` attribute. ++ ```html + <div + class="teams-share-button" + data-href="https://<link-to-be-shared>" + data-icon-px-size="64"> + </div> + ``` ++ * If the shared link requires user authentication or the URL preview from your link doesn't render properly in Teams, then you can disable the URL preview by adding the `data-preview` attribute and setting it to `false`. ++ ```html + <div + class="teams-share-button" + data-href="https://<link-to-be-shared>" + data-preview="false"> + </div> + ``` ++ * If you want to display a message of your choice in the compose box, you can define your text in `data-msg-text` attribute. ++ ```html + <div + class="teams-share-button" + data-href="https://<link-to-be-shared>" + data-msg-text="<default-message-to-be-populated-in-compose-box>" + data-preview="false"> + </div> + ``` ++# [Method 2](#tab/method2) ++This method allows you to have control over which button is dynamically rendered or when the script is executed. The script only runs when `window.shareToMicrosoftTeams.renderButtons()` is invoked. You can pass specific HTML elements through the `renderButtons({elements: []})` API. You can customize the button styles, size, and languages. - :::image type="content" source="~/assets/icons/share-to-teams-icon.png" alt-text="Share to Teams icon"::: +The async `shareToMicrosoftTeams.renderButtons(options)` API renders all share buttons that have the class name `teams-share-button` on the page. If an `options (optional)` object is supplied with a list of elements as shown in the following code, those elements are rendered into the **Share** buttons. -1. Alternatively, if you want a different icon size for the Share to Teams button, use the `data-icon-px-size` attribute. +```javascript +`options` (optional): `{ elements?: HTMLElement[] }` +``` ++1. Add the launcher.js script on your webpage. ```html- <div - class="teams-share-button" - data-href="https://<link-to-be-shared>" - data-icon-px-size="64"> - </div> + <script async defer src="https://teams.microsoft.com/share/launcher.js" onload="onLoadComplete()"></script> + ``` ++2. Create an HTML element and specify the required attributes. After the launcher script is fully loaded, ensure that the rendering logic is executed. ++ ```javascript + async function onLoadComplete() { + const shareButton = document.createElement("div"); + shareButton.setAttribute("data-app-id", "<app-id>"); + shareButton.textContent = "Share Test App" + shareButton.setAttribute("data-href", "<app-content-url>"); + shareButton.setAttribute("data-preview", "false"); + shareButton.setAttribute("data-msg-text", "<default-message-to-be-populated-in-compose-box>"); + await window.shareToMicrosoftTeams.renderButtons({elements: [shareButton]}); + } + ``` ++++Here's the end user scenario where the content is shared to chat or channel using Share to Teams: ++</br> +<details> +<summary>Share content to a chat or channel</summary> ++1. Open the web app in the browser and select **Share to Teams**. The Share to Teams dialog opens. ++ :::image type="content" source="../../assets/images/share-to-teams/share-to-teams-browser.png" alt-text="Screenshot shows the Share to Teams button in the browser."::: ++1. Add the chat or channel name. ++ :::image type="content" source="~/assets/images/share-to-teams/share-to-teams-popup.png" alt-text="Screenshot shows the Share to Teams dialog to add chat or channel name."::: ++ > [!NOTE] + > If the app isn't already added in chat or channel scope, an app consent disclaimer appears within the Share to Teams dialog. ++1. Select **Share**. The app content gets shared in the respective scope. ++</details> +</br> ++### Share content in meetings ++Share to Teams from web apps allows users to share content to a live or an upcoming meeting. When you enable content sharing in meetings, it allows users to share information that creates a collaborative workspace within the meeting. For example, users can share workboards from a web app directly onto the meeting stage, facilitating a collective effort to gather and organize ideas. ++Here's how the shared web content appears in the meeting stage: +++Before you enable share content to meetings, you must ensure the following: ++1. A [Microsoft Teams app with a tab](../../apps-in-teams-meetings/build-tabs-for-meeting.md) that supports meeting side panel and [Share to Stage APIs](../../apps-in-teams-meetings/build-apps-for-teams-meeting-stage.md). ++2. The meeting app must support Share to Stage APIs with two primary requirements to display the content on the meeting stage: ++ * The [app manifest](../../resources/schem) that supports both `meetingStage` and `meetingSidePanel` configured as frame contexts. If not configured, meeting participants might not be able to view the content on stage. + * The app that supports `MeetingStage.Write.Chat` permissions for taking control of the stage. This is a read permission requirement. ++> [!NOTE] +> +> * If the app doesn't have meeting stage and side panel capabilities, the content aren't stored and the messages are sent in the regular meeting chat. +> * If an app installation is blocked by the admin, then the app is added to the chat and not the meeting of the user. +> * Share to Teams in meeting is supported only for tab scenarios and specific to Teams. ++**Enable Share to Teams for meeting** ++1. Add the `launcher.js` script on your webpage. ++ ```html + <script async defer src="https://teams.microsoft.com/share/launcher.js"></script> ``` -1. If the shared link requires user authentication, and the URL preview from your link to be shared doesn't render well in Teams, then you can disable the URL preview by adding the `data-preview` attribute set to `false`. +1. Add an HTML element on your webpage with `teams-share-button` in the `class` attribute and the link to share in the `data-href` attribute. To enable your users to share content in meetings from Share to Teams, add `allow-share-in-meeting` attribute and set it to `true`. ```html- <div - class="teams-share-button" - data-href="https://<link-to-be-shared>" - data-preview="false"> - </div> + <div + class="teams-share-button" + data-href="https://<link-to-be-shared>" + data-allow-share-in-meeting="true" + data-app-id="<app-id>" + > + </div> ``` -1. To display a message of your choice in compose box, you can define your text in `data-msg-text` attribute. + After the configuration, the Share to Teams dialog appears with the **Present now** option. Present now allows the users to share content to an ongoing meeting. For the user who shared content in meeting stage, the side panel opens automatically as the meeting begins and populates the shared content in the meeting side panel. - ```html - <div - class="teams-share-button" - data-href="https://<link-to-be-shared>" - data-msg-text="<default-message-to-be-populated-in-compose-box>" - data-preview="false"> - </div> - ``` + :::image type="content" source="~/assets/images/share-to-teams/share-to-team-dialog.png" alt-text="Screenshot shows the Share to Teams dialog with the Present now option."::: ++Here are a few end user scenarios where the content is shared to meetings using Share to Teams: -1. If your page dynamically renders content, you can use the `shareToMicrosoftTeams.renderButtons()` method to force **Share** to render at the appropriate place in the pipeline. +</br> +<details> +<summary>Share content to an upcoming meeting</summary> ++1. Open the web app in the browser and select **Share to Teams**. The Share to Teams dialog opens. ++ :::image type="content" source="../../assets/images/share-to-teams/share-to-teams-browser.png" alt-text="Screenshot shows the Share to Teams button in the browser."::: ++1. Add the meeting name. ++ :::image type="content" source="~/assets/images/share-to-teams/share-to-team-dialog.png" alt-text="Screenshot shows the Share to Teams dialog to add meeting name."::: ++ > [!NOTE] + > If the app isn't already added in the meeting scope, an app consent disclaimer appears within the Share to Teams dialog. ++1. Select **Share**. The app content gets shared in an upcoming meeting chat as an Adaptive Card. ++ :::image type="content" source="../../assets/images/share-to-teams/upcoming-meeting-content.png" alt-text="Screenshot shows the shared content in the meeting chat." lightbox="../../assets/images/share-to-teams/upcoming-meeting-content-lightbox.png"::: ++When the meeting begins, the content shared to the meeting is displayed in a side panel experience, based on the app that's opened. ++</details> +</br> +<details> +<summary>Share content in an ongoing meeting</summary> ++1. Open the web app in the browser and select **Share to Teams**. The Share to Teams dialog opens. ++ :::image type="content" source="../../assets/images/share-to-teams/share-to-teams-browser.png" alt-text="Screenshot shows the Share to Teams button in the browser to share in meeting."::: ++1. Select **Present now**. A consent dialog appears to share the content in the meeting. ++ :::image type="content" source="~/assets/images/share-to-teams/share-to-team-dialog.png" alt-text="Screenshot shows the Share to Teams dialog to add content to an ongoing meeting."::: ++ > [!NOTE] + > + > * If the app isn't already added in the meeting scope, an app consent disclaimer appears within the Share to Teams dialog. + > * If there's no ongoing meeting, the user can select **Meet now** to begin a meeting and share content. ++1. Select **Start sharing**. ++ :::image type="content" source="../../assets/images/share-to-teams/start-share-live-meeting.png" alt-text="Screenshot shows how to share apps in teams meeting." lightbox="../../assets/images/share-to-teams/start-share-live-meeting-lightbox.png"::: ++1. The web app is shared to meeting stage and all the participants can interact and work together. ++ :::image type="content" source="../../assets/images/share-to-teams/share-meeting-live.png" alt-text="Screenshot shows an app shared to the teams meeting stage."::: ++</details> +</br> +<details> +<summary>Start a meeting and share content</summary> ++If there's no ongoing meeting and the user wants to initiate a meeting and present the content, they can do so with the Share to Teams option. To start a meeting and share the content: ++1. Open the web app in the browser and select **Share to Teams**. The Share to Teams dialog opens. ++ :::image type="content" source="../../assets/images/share-to-teams/share-to-teams-browser.png" alt-text="Screenshot shows the Share to Teams button on the browser."::: ++1. Add either the meeting name or participants to begin a new meeting. ++1. Select **Present now**. A consent dialog appears to start the meeting. ++ :::image type="content" source="~/assets/images/share-to-teams/share-to-team-dialog.png" alt-text="Screenshot shows the Share to Teams dialog to add meeting name or participants."::: ++ > [!NOTE] + > If the app isn't already added in the meeting scope, an app consent disclaimer appears within the Share to Teams dialog. ++1. Select **OK**. The meeting window appears to join the meeting. ++ :::image type="content" source="../../assets/images/share-to-teams/meeting-start-consent.png" alt-text="Screenshot shows the Present Now option in the Share to Teams dialog." lightbox="../../assets/images/share-to-teams/meeting-start-consent-lightbox.png"::: ++1. Select **Join Now**. After you join the meeting, a consent dialog appears to share the content in the meeting. ++ :::image type="content" source="../../assets/images/share-to-teams/join-meeting-now.png" alt-text="Screenshot shows the join meeting window." lightbox="../../assets/images/share-to-teams/join-meeting-now-lightbox.png"::: ++1. Select **Start sharing**. ++ :::image type="content" source="../../assets/images/share-to-teams/start-share-new-meeting.png" alt-text="Screenshot shows the consent dialog." lightbox="../../assets/images/share-to-teams/start-share-new-meeting-lightbox.png"::: ++1. The web app is shared to meeting stage and all the participants can interact and work together. ++ :::image type="content" source="../../assets/images/share-to-teams/share-meeting-live.png" alt-text="Screenshot shows app shared to the teams meeting stage."::: ++</details> +</br> ## Craft your website preview -When your website is shared to Teams, the card that is inserted into the selected channel contains a preview of your website. You can control the behavior of this preview by ensuring the appropriate meta-data is added to the website being shared, such as the `data-href` URL. +When your website is shared to Teams, the card that's inserted into the selected channel contains a preview of your website. You can control the behavior of this preview by ensuring the appropriate metadata is added to the website that's being shared, such as the `data-href` URL. To display the preview: The following table outlines the necessary tags: |-|-|-| |Title|`<meta name="title" content="Example Page Title">`|`<meta property="og:title" content="Example Page Title">`| |Description|`<meta name="description" content="Example Page Description">`|`<meta property="og:description" content="Example Page Description">`|-|Thumbnail Image| none. |`<meta property="og:image" content="http://example.com/image.jpg">`| +|Thumbnail Image| None |`<meta property="og:image" content="http://example.com/image.jpg">`| You can use either the HTML default versions or the Open Graph version. -## Share to Teams for Education --For teachers using the Share to Teams button, there's an additional option to `Create an Assignment` that enables you to quickly create an assignment in the chosen Team, based on the shared link. The following image displays Share to Teams for education: ---## Full launcher.js definition --| Property | HTML attribute | Type | Default | Description | -| -- | - | | - | - | -| href | `data-href` | string | n/a | The href of the content to share. | -| preview | `data-preview` | Boolean (as a string) | `true` | Whether or not to show a preview of the content to share. | -| iconPxSize | `data-icon-px-size` | number (as a string) | `32` | The size in pixels of the Share to Teams button to render. | -| msgText | `data-msg-text` | string | n/a | Default text to be inserted before the link in the message compose box. Maximum number of characters is 200. | -| assignInstr | `data-assign-instr` | string | n/a | Default text to be inserted in the assignments "Instructions" field. Maximum number of characters is 200. | -| assignTitle | `data-assign-title` | string | n/a | Default text to be inserted in the assignments "Title" field. Maximum number of characters is 50. | --### Methods --**`shareToMicrosoftTeams.renderButtons(options)`** --`options` (optional): `{ elements?: HTMLElement[] }` +## Share to Teams for education -All share buttons are rendered on the page. If an optional `options` object is supplied with a list of elements, those elements are rendered into share buttons. --### Set default form values +For teachers using the Share to Teams button, there's an additional option to `Create an Assignment` that enables you to quickly create an assignment in the chosen Team, based on the shared link. You can select to set default values for the following fields on the Share to Teams form: You can select to set default values for the following fields on the Share to Te * Assignment Instructions: `assignInstr` * Assignment Title: `assignTitle` -#### Example +The following image displays Share to Teams for education: +++### Example - Default form values are given in the following example: +The default form values are given in the following example: ```html <span You can select to set default values for the following fields on the Share to Te ></span> ``` +The following are the launcher.js definitions: ++| Property | HTML attribute | Type | Default | Description | +| -- | - | | - | - | +| url | `data-href` | string | NA | The URL of the content to be shared. This URL can be used to pin the content to an upcoming meeting or to share in an ongoing meeting. Required if `allow-share-in-meeting` is set as `true`. | +| preview | `data-preview` | Boolean (as a string) | `true` | The value specifies whether to show a preview of the content to be shared. | +| appId | `data-app-id` | String | NA | The ID of the app to be shared. Required if `allow-share-in-meeting` is set as `true`. | +| iconPxSize | `data-icon-px-size` | number (as a string) | `32` | The size in pixels of the Share to Teams button to be rendered. | +| msgText | `data-msg-text` | string | NA | The default text to be added before the link in the message compose box. The maximum number of characters is 200. | +| assignInstr | `data-assign-instr` | string | NA | The default text to be added in the assignments **Instructions** field. The maximum number of characters is 200. | +| assignTitle | `data-assign-title` | string | NA | The default text to be added in the assignments **Title** field. The maximum number of characters is 50. | +| share in meeting | `data-allow-share-in-meeting` | String | NA | The value that allows users to share content in meetings in addition to existing capability to share in chat or channel. It's considered as `false` by default. | ++## Code sample ++| **Sample name** | **Description** | **Node.js** | +|--|--|-| +| Share to Teams | This sample app displays a webpage as a tab and includes a Share to Teams button with a Present now option. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs) | + ## See also * [Integrate web apps](~/samples/integrate-web-apps-overview.md) * [Share to Teams from personal app or tab](share-to-teams-from-personal-app-or-tab.md)+* [Share in meeting](share-in-meeting.md) |
platform | Share To Teams Overview | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/build-and-test/share-to-teams-overview.md | Title: Share to Teams overview description: Learn how to create Share to Teams button for web apps and personal app or tab, and where to add it in the Microsoft Teams apps and tab apps. ms.localizationpriority: medium Previously updated : 02/09/2023 Last updated : 10/29/2024 # Share to Teams -Share to Teams is a button enabled on any web app, personal app, or tab that allows users to share content to other users in Teams. +Share to Teams is a button enabled on any web app, personal app, or tab that allows users to share content to other users in Teams. You can customize the placement of Share to Teams button on the app. Users can pin the crucial content and refer to it while collaborating with Teams. -You can also decide the placement of the Share to Teams button on the app. Users can pin the crucial content and refer to it while collaborating with Teams. --You can enable Share to Teams button in the following scopes: +You can enable Share to Teams in the following scopes: * Web apps * Personal app or tab You can enable Share to Teams button in the following scopes: ## Share to Teams from web apps -You can embed the Share to Teams button on the web apps that allows users to share the content from the web apps to any chat, group chat, or channel in Teams, without switching the context. +You can embed Share to Teams on the web apps that allows users to share the content from the web apps to any chat, group chat, meeting, or channel in Teams, without switching the context. ++In addition to Share to Teams, the **Present Now** option in a meeting stage allows users to share the content in live meetings or Meet now scenarios. The users can share content and also present it live for real-time collaboration and discussion. For more information, see [Share to Teams from web apps](share-to-teams-from-web-apps.md). ## Share to Teams from personal app or tab -You can embed the Share to Teams button in the personal app or tab hosted inside Teams that allows users to share the content from the personal app or tab to any chat, group chat, or channel in Teams, without switching the context. +You can embed Share to Teams in the personal app or tab hosted inside Teams that allows users to share the content from the personal app or tab to any chat, group chat, or channel in Teams, without switching the context. For more information, see [Share to Teams from personal app or tab](share-to-teams-from-personal-app-or-tab.md).++## See also ++* [Integrate web apps](../../samples/integrate-web-apps-overview.md) +* [Share in meeting](share-in-meeting.md) |
platform | Tabs Mobile | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/design/tabs-mobile.md | If you're uploading your custom app or publishing to an organization's app catal ## See also * [Build tabs for Teams](../what-are-tabs.md)-* [Build tabs with Adaptive Cards](../how-to/build-adaptive-card-tabs.md) * [Create a personal tab](../how-to/create-personal-tab.md) * [Plan responsive tabs for Teams mobile](../../concepts/design/plan-responsive-tabs-for-teams-mobile.md) * [Design your tab for Microsoft Teams](tabs.md) |
platform | Access Teams Context | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/access-teams-context.md | The following image shows the dark theme option in the Teams: :|:--|:| |Tab channel context|This sample shows how to use the contents of tab context object in a private and shared channel. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-channel-context/nodejs) -## Next step --> [!div class="nextstepaction"] -> [Build tabs with Adaptive Cards](~/tabs/how-to/build-adaptive-card-tabs.md) - ## See also * [Build tabs for Teams](../what-are-tabs.md) |
platform | Build Adaptive Card Tabs | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/build-adaptive-card-tabs.md | - Title: Build Adaptive Card Tabs- -description: Learn to build tabs using Adaptive Cards where front end is rendered with Adaptive Cards, backend is powered by a bot. Explore invoke activities and handle submits. -- Previously updated : 05/02/2023---# Build tabs with Adaptive Cards --> [!WARNING] -> Adaptive Card tabs aren't available in the new Teams client. The Classic Teams client is expected to be deprecated by March 31, 2024. If your app is using Adaptive Card tabs, we recommend to rebuild the tab as a web-based tab. For more information, see [Build tabs for Teams](../what-are-tabs.md). --When developing a tab using the traditional method, you might run into these issues: --* HTML and CSS considerations -* Slow load times -* iFrame constraints -* Server maintenance and costs --You can build Adaptive Card tabs in Teams. Instead of embedding web content in an iFrame, you can render Adaptive Cards to a tab. While the front end is rendered with Adaptive Cards, the backend is powered by a bot. The bot is responsible for accepting requests and responding appropriately with the Adaptive Card that is rendered. --You can build your tabs with ready-made user interface (UI) building blocks native on desktop, web, and mobile. This article helps you understand the changes required to be made to the app manifest. The article also identifies how the invoke activity requests and sends information in tab with Adaptive Cards, and its effect on the modal dialog (referred as task module in TeamsJS v1.x) workflow. --The following image shows build tabs with Adaptive Cards in desktop and mobile: ---## Prerequisites --Before you start using Adaptive Cards to build tabs, you must: --* Be familiar with [bot development](../../bots/what-are-bots.md), [Adaptive Cards](https://adaptivecards.io/), and [modal dialogs](../../task-modules-and-cards/task-modules/task-modules-bots.md) in Teams. -* Have a bot running in Teams for your development. --## Changes to app manifest --Personal apps that render tabs must include a `staticTabs` array in their app manifest. Adaptive Card tabs are rendered when the `contentBotId` property is provided in the `staticTab` definition. Static tab definitions must contain either a `contentBotId`, specifying an Adaptive Card tab or a `contentUrl`, specifying a typical hosted web content tab experience. --> [!NOTE] -> The `contentBotId` property is available in manifest version 1.9 or later. --Provide the `contentBotId` property with the `botId` that the Adaptive Card tab must communicate with. The `entityId` configured for the Adaptive Card tab is sent in the `tabContext` parameter of each invoke request, and can be used to differentiate Adaptive Card Tabs that are powered by the same bot. For more information about other static tab definition fields, see [manifest schema](../../resources/schem#statictabs). --Following is a sample Adaptive Card tab manifest: --```json -{ - "$schema": "https://raw.githubusercontent.com/OfficeDev/microsoft-teams-app-schema/preview/DevPreview/MicrosoftTeams.schema.json", - "manifestVersion": "1.9", - "id": "00000000-0000-0000-0000-000000000000", - "version": "0.0.1", - "developer": { - "name": "Contoso", - "websiteUrl": "https://contoso.example.com", - "privacyUrl": "https://contoso.example.com/privacy.html", - "termsOfUseUrl": "https://contoso.example.com/terms.html" - }, - "name": { - "short": "Contoso", - "full": "Contoso Home" - }, - "description": { - "short": "Add short description here", - "full": "Add full description here" - }, - "icons": { - "outline": "icon-outline.png", - "color": "icon-color.png" - }, - "accentColor": "#D85028", - "configurableTabs": [], - "staticTabs": [ - { - "entityId": "homeTab", - "name": "Home", - "contentBotId": "00000000-0000-0000-0000-000000000000", - "scopes": ["personal"] - }, - { - "entityId": "moreTab", - "name": "More", - "contentBotId": "00000000-0000-0000-0000-000000000000", - "scopes": ["personal"] - } - ], - "connectors": [], - "composeExtensions": [], - "permissions": ["identity", "messageTeamMembers"], - "validDomains": [ - "contoso.example.com", - "token.botframework.com" - ] -} -``` --## Invoke activities --Communication between your Adaptive Card tab and your bot is done through `invoke` activities. Each `invoke` activity has a corresponding **name**. Use the name of each activity to differentiate each request. `tab/fetch` and `tab/submit` are the activities covered in this section. --> [!NOTE] -> -> * Bots need to send all the responses to [service URL](/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0&preserve-view=true#base-uri). Service URL is received as part of incoming `activity` payload. -> * The invoke payload size has increased to 80kb. --### Fetch Adaptive Card to render to a tab --`tab/fetch` is the first invoke request that your bot receives when a user opens an Adaptive Card tab. When your bot receives the request, it either sends a tab **continue** response or a tab **auth** response. -The **continue** response includes an array for **cards**, which is rendered vertically to the tab in the order of the array. --> [!NOTE] -> For more information on **auth** response, see [authentication](#authentication). --The following code provides examples of `tab/fetch` request and response: --**`tab/fetch` request** --```json -// tab/fetch POST request: agents/{botId}/invoke -{ - "name": "tab/fetch", - "value: { - "tabContext": { - "tabEntityId": "{tab_entity_id}" - }, - "context": { - "theme": "default" - } - }, - "conversation": { - "id": "{generated_conversation_id}" - }, - "imdisplayname": "{user_display_name}" -} -``` --**`tab/fetch` response** --```json -// tab/fetch **continue** POST response: -{ - "tab": { - "type": "continue", - "value": { - "cards": [ - { - "card": adaptiveCard1, - }, - { - "card": adaptiveCard2, - }, - { - "card": adaptiveCard3 - } - ] - }, - }, - "responseType": "tab" -} -``` --### Handle submits from Adaptive Card --After an Adaptive Card is rendered in the tab, it can respond to user interactions. This response is handled by the `tab/submit` invoke request. --When a user selects a button on the Adaptive Card tab, the `tab/submit` request is triggered to your bot with the corresponding data through the `Action.Submit` function of Adaptive Card. The Adaptive Card data is available through the data property of the `tab/submit` request. You receive either of the following responses to your request: --* An HTTP status code `200` response with no body. An empty 200 response results in no action taken by the client. -* The standard `200` tab **continue** response, as explained in [fetch Adaptive Card](#fetch-adaptive-card-to-render-to-a-tab). A tab **continue** response triggers the client to update the rendered Adaptive Card tab with the Adaptive Cards provided in the cards array of the **continue** response. --The following code provides examples of `tab/submit` request and response: --**`tab/submit` request** --```json -// tab/submit POST request: agents/{botId}/invoke: -{ - "name": "tab/submit", - "value": { - "data": { - "type": "tab/submit", - //...<data properties> - }, - "context": { - "theme": "default" - }, - "tabContext": { - "tabEntityId": "{tab_entity_id}" - }, - }, - "conversation": { - "id": "{generated_conversation_id}" - }, - "imdisplayname": "{user_display_name}" -} -``` --**`tab/submit` response** --```json -//tab/fetch **continue** POST response: -{ - "tab": { - "type": "continue", - "value": { - "cards": [ - { - "card": adaptiveCard1, - }, - { - "card": adaptiveCard2, - } - ] - }, - }, - "responseType": "tab" -} -``` --## Understand dialog workflow --Modal dialogs also use Adaptive Cards to invoke `task/fetch` and `task/submit` requests and responses. For more information, see [using dialogs in Microsoft Teams bots](../../task-modules-and-cards/task-modules/task-modules-bots.md). --With the introduction of Adaptive Card tab, there's a change in how the bot responds to a `task/submit` request. If you're using an Adaptive Card tab, the bot responds to the `task/submit` invoke request with the standard tab **continue** response, and closes the dialog. The Adaptive Card tab is updated by rendering the new list of cards provided in the tab **continue** response body. --### Invoke `task/fetch` --The following code provides examples of `task/fetch` request and response: --**`task/fetch` request** --```json -// task/fetch POST request: agents/{botId}/invoke -{ - "name": "task/fetch", - "value": { - "data": { - "type": "task/fetch" - }, - "context": { - "theme": "default", - }, - "tabContext": { - "tabEntityId": "{tab_entity_id}" - } - }, - "imdisplayname": "{user_display_name}", - "conversation": { - "id": "{generated_conversation_id}" - } -} -``` --**`task/fetch` response** --```json -// task/fetch POST response: agents/{botId}/invoke -{ - "task": { - "value": { - "title": "Ninja Cat", - "height": "small", - "width": "small", - "card": { - "contentType": "application/vnd.microsoft.card.adaptive", - "content": adaptiveCard, - } - }, - "type": "continue" - }, - "responseType": "task" -} -``` --### Invoke `task/submit` --The following code provides examples of `task/submit` request and response: --**`task/submit` request** --```json -// task/submit POST request: agent/{botId}/invoke: -{ - "name": "task/submit", - "value": { - "data": {serialized_data_object}, - "context": { - "theme": "default" - }, - "tabContext": { - "tabEntityId": "{tab_entity_id}" - }, - }, - "conversation": { - "id": "{generated_conversation_id}" - }, - "imdisplayname": "{user_display_name}", -} -``` --**`task/submit` tab response type** --```json -// tab/fetch **continue** POST response: -{ - "task":{ - "value": { - "tab": { - "type": "continue", - "value": { - "cards": [ - { - "card": adaptiveCard1 - }, - { - "card": adaptiveCard2 - } - ] - } - } - }, - "type": "continue" - }, - "responseType": "task" -} -``` --## Authentication --In the previous sections, you've seen that most of the development paradigms can be extended from the dialog requests and responses into tab requests and responses. When it comes to handling authentication, the workflow for Adaptive Card tab follows the authentication pattern for message extensions. For more information, see [add authentication](../../messaging-extensions/how-to/add-authentication.md). --`tab/fetch` requests can have either a **continue** or an **auth** response. When a `tab/fetch` request is triggered and receives a tab **auth** response, the sign in page is shown to the user. --**To get an authentication code through `tab/fetch` invoke** --1. Open your app. The sign in page appears. -- > [!NOTE] - > The app logo is provided through the `icon` property defined in the app manifest. The title appearing after the logo is defined in the `title` property returned in the tab **auth** response body. --1. Select **Sign in**. You're redirected to the authentication URL provided in the `value` property of the **auth** response body. -1. A pop-up window appears. This pop-up window hosts your web page using the authentication URL. -1. After you sign in, close the window. An **authentication code** is sent to the Teams client. -1. The Teams client then reissues the `tab/fetch` request to your service, which includes the authentication code provided by your hosted web page. --### `tab/fetch` authentication data flow --The following image provides an overview of how the authentication data flow works for a `tab/fetch` invoke. ---**`tab/fetch` auth response** --The following code provides an example of `tab/fetch` auth response: --```json -// tab/auth POST response (openURL) -{ - "tab": { - "type": "auth", - "suggestedActions":{ - "actions":[ - { - "type": "openUrl", - "value": "https://example.com/auth", - "title": "Sign in to this app" - } - ] - } - } -} -``` --### Example --The following code shows a reissued request example: --```json -{ - "name": "tab/fetch", - "type": "invoke", - "timestamp": "2021-01-15T00:10:12.253Z", - "channelId": "msteams", - "serviceUrl": "https://smba.trafficmanager.net/amer/", - "from": { - "id": "{id}", - "name": "John Smith", - "aadObjectId": "00000000-0000-0000-0000-000000000000" - }, - "conversation": { - "tenantId": "{tenantId}", - "id": "tab:{guid}" - }, - "recipients": { - "id": "28:00000000-0000-0000-0000-000000000000", - "name": "ContosoApp" - }, - "entities": [ - { - "locale": "en-us", - "country": "US", - "platform": "Windows", - "timezone": "America/Los_Angeles", - "type": "clientInfo" - } - ], - "channelData": { - "tenant": { "id": "00000000-0000-0000-0000-000000000000" }, - "source": { "name": "message" } - }, - "value": { - "tabContext": { "tabEntityId": "homeTab" }, - "state": "0.43195668034524815" - }, - "locale": "en-US", - "localTimeZone": "America/Los_Angeles" -} -``` --## Code sample --|**Sample name** | **Description** |**.NET** | **Node.js** | **Manifest**| -|-|--|--|--|--| -| Show Adaptive Cards in Teams tab | Microsoft Teams tab sample code, which demonstrates how to show Adaptive Cards in Teams. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-adaptive-cards/csharp)| [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-adaptive-cards/nodejs) |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-adaptive-cards/csharp/demo-manifest/tab-adaptive-card.zip)| --## Step-by-step guide --Follow the [step-by-step](../../sbs-tab-with-adaptive-cards.yml) guide to build tab with Adaptive Cards. --## Next step --> [!div class="nextstepaction"] -> [Tabs link unfurling and Stageview](~/tabs/tabs-link-unfurling.md) --## See also --* [Build tabs for Teams](../what-are-tabs.md) -* [Tabs on mobile](../design/tabs-mobile.md) -* [Cards](../../task-modules-and-cards/what-are-cards.md) -* [Use dialogs in tabs](../../task-modules-and-cards/task-modules/task-modules-tabs.md) -* [Form completion feedback](../../task-modules-and-cards/cards/cards-actions.md#form-completion-feedback) -* [Microsoft Teams update](../../resources/teams-updates.md) |
platform | Conversational Tabs | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/conversational-tabs.md | - Title: Start a New Conversation Tab- -description: Learn how to create conversational tabs and subentities in Microsoft Teams and functions such as start, continue, enhance, and close a conversation. -- Previously updated : 01/30/2023---# Create conversational tabs --Conversational subentities provide a way to allow users to have conversations about subentities in your tab. Such as specific task, patient, and sales opportunity, instead of discussing the entire tab, also known as entity. A traditional channel or configurable tab allows the user to have a conversation about a tab, but the user requires a more focused conversation. The requirement for a more focused conversation can arise either, if there is too much content to have a centralized discussion or because the content changed over time, making the conversation irrelevant to the content shown. Conversational subentities provide a much more focused conversation experience for dynamic tabs. --Conversational subentities are only supported in channels. They can be used from a personal or static tab to create or continue conversations in tabs that are already pinned to a channel. The static tab is useful if you want to provide one location for a user to view and access conversations happening across multiple channels. --## Prerequisites --To support conversational subentities, your tab web application must have the ability to store a mapping between subentities Γåö conversations in a backend database. The `conversationId` is provided, but you must store that `conversationId` and return it to Teams in order for users to continue the conversation. --## Start a new conversation --To start a new conversation, use the `openConversation()` function. Starting and continuing a conversation are all handled by this method. The inputs to the function change depending on which action you want to take, from the user's perspective, this opens the conversation panel to the right of the screen, either to initiate a conversation or continue a conversation. --``` javascript -microsoftTeams.conversations.openConversation(openConversationRequest); -``` --**openConversation** takes the following inputs to start a conversation in a channel: --* **subEntityId**: The ID of your specific subentity. For example, task-123. -* **entityId**: The ID of the tab instance when it was created. The ID is important to refer back to the same tab instance. -* **channelId**: The channel in which the tab instance resides. - > [!NOTE] - > The **channelId** is optional for channel tabs. However, it is recommended if you want to keep your implementation across channel and static tabs the same. -* **title**: The title that is shown to the user in the chat panel. --Most of these values can also be retrieved from the [`app.getContext()`](/javascript/api/@microsoft/teams-js/app#@microsoft-teams-js-app-getcontext) API (`microsoftTeams.getContext()` in TeamsJS v1). For more information, see [PageInfo interface](/javascript/api/@microsoft/teams-js/app.pageinfo). --```javascript -microsoftTeams.conversations.openConversation({ΓÇ£subEntityIdΓÇ¥:ΓÇ¥task-1ΓÇ¥, ΓÇ£entityIdΓÇ¥: ΓÇ£tabInstanceId-1ΓÇ¥, ΓÇ£channelIdΓÇ¥: ΓÇ¥19:baa6e71f65b948d189bf5c892baa8e5a@thread.skypeΓÇ¥, ΓÇ£titleΓÇ¥: "Task TitleΓÇ¥}); -``` --The following image shows the conversation panel: ---If the user starts a conversation, it's important to listen for the callback of that event to retrieve and save the **conversationId**: --```javascript -ΓüámicrosoftTeams.conversations.openConversation({ - ..., - onStartConversation: (conversationResponse) => { - Γüá// console.log(conversationResponse) - }, -}); -``` --The `conversationResponse` object contains information related to the conversation that was started. It's recommended that you save all the properties of this response object for later use. --## Continue a conversation --After a conversation starts, subsequent calls to `openConversation()` require, that you also provide the same inputs as in [start a new conversation](#start-a-new-conversation), but also include the **conversationId**. The conversation panel opens for the users with the appropriate conversation in view. Users can see new or incoming messages in real-time. --The following image shows the conversation panel with the appropriate conversation: ---## Enhance a conversation --It's important that your tab includes [deep links to your subentity](~/concepts/build-and-test/deep-links.md). For example, user selecting the tab chiclet deep link from the channel conversation. The expected behavior is to receive the deep link, open that subentity, and then open the conversation panel for that subentity. --To support conversational subentities from your personal or static tab, you don't have to change anything in your implementation. We only support starting or continuing conversations from channel tabs that are already pinned. Supporting static tabs allows you to provide a single location for your users to interact with all your subentities. It's important that you save the `subEntityId`, `entityId`, and `channelId` when your tab is originally created in a channel to have the right properties when opening the conversation view in a static tab. --## Close a conversation --You can manually close the conversation view by calling the `closeConversation()` function. --```javascript -microsoftTeams.conversations.closeConversation(); -``` --You can also listen for an event when the users select **Close (X)** in the conversation view. --```javascript -ΓüámicrosoftTeams.conversations.openConversation({ - ..., - onCloseConversation: (conversationResponse) => { - Γüá// console.log(conversationResponse) - }, -}); -``` --## Code sample --| Sample name | Description | .NET |Node.js|Manifest| -|-|-||-|-| -|Create Conversational tab| Microsoft Teams tab sample app for demonstrating create conversation tab. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-conversations/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-conversations/nodejs) |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-conversations/csharp/demo-manifest/tab-conversations.zip)| --## See also --* [Build tabs for Teams](../what-are-tabs.md) -* [Create a personal tab](create-personal-tab.md) -* [Create a channel tab or group tab](create-channel-group-tab.md) -* [Build tabs with Adaptive Cards](build-adaptive-card-tabs.md) -* [Tabs on mobile](~/tabs/design/tabs-mobile.md) |
platform | Create Channel Group Tab | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/create-channel-group-tab.md | Title: How to Create Channel/Group Tab -description: Create custom channel, group tabs with Node.js, ASP.NET Core, MVC. Build apps, packages, run secret tunnels, upload to Teams, and develop your first Blazor app. + Title: How to Create Configurable Tab +description: Create custom configurable tabs with Node.js, ASP.NET Core, MVC. Build apps, packages, run secret tunnels, upload to Teams, and develop your first Blazor app. ms.localizationpriority: high zone_pivot_groups: teams-app-environment-blazor Last updated 02/27/2023 -# Create a channel tab or group tab +# Create a configurable tab -Channel or group tabs deliver content to channels and group chats, which help to create collaborative spaces around dedicated web-based content. --Ensure that you've all the [prerequisites](~/tabs/how-to/tab-requirements.md) to build your channel or group tab. +Ensure that you've all the [prerequisites](~/tabs/how-to/tab-requirements.md) to build your configurable tab. [!INCLUDE [sdk-include](~/includes/sdk-include.md)] ::: zone pivot="node-java-script" -## Create a custom channel or group tab with Node.js +## Create a configurable tab with Node.js 1. At the command prompt, install the [Yeoman](https://yeoman.io/) and [gulp-cli](https://www.npmjs.com/package/gulp-cli) packages by entering the following command after installing the **Node.js**: Ensure that you've all the [prerequisites](~/tabs/how-to/tab-requirements.md) to npm install generator-teams --global ``` -## Generate your application with a channel or group tab +## Generate your application with a configurable tab -1. At the command prompt, create a new directory for your channel or group tab. +1. At the command prompt, create a new directory for your configurable tab. 1. Enter the following command in your new directory to start the Microsoft Teams app generator: gulp ngrok-serve "composeExtensions": [], ``` -1. Follow the directions for adding a tab. There's a custom configuration dialog for your channel or group tab. +1. Follow the directions for adding a tab. There's a custom configuration dialog for your configurable tab. 1. Select **Save** and your tab is added to the channel's tab bar. :::image type="content" source="~/assets/images/tab-images/channel-tab-uploaded.png" alt-text="Screenshot shows the uploaded channel tab in Teams."::: - Your channel or group tab is successfully created and added in Teams. + Your configurable tab is successfully created and added in Teams. ::: zone-end ::: zone pivot="razor-csharp" -## Create a custom channel or group tab with ASP.NET Core +## Create a custom configurable tab with ASP.NET Core 1. At the command prompt, create a new directory for your tab project. gulp ngrok-serve git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git ``` -## Generate your application with a channel or group tab +## Generate your application with a configurable tab 1. Open Visual Studio and select **Open a project or solution**. Ensure that you keep the command prompt with ngrok running and make a note of th :::image type="content" source="~/assets/images/tab-images/channel-tab-aspnet-uploaded.png" alt-text="Screenshot shows that the channel tab is uploaded."::: - Your channel or group tab is successfully created and added in Teams. + Your configurable tab is successfully created and added in Teams. ::: zone-end ::: zone pivot="mvc-csharp" -## Create a custom channel or group tab with ASP.NET Core MVC +## Create a custom configurable tab with ASP.NET Core MVC 1. At the command prompt, create a new directory for your tab project. Ensure that you keep the command prompt with ngrok running and make a note of th git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git ``` -## Generate your application with a channel or group tab +## Generate your application with a configurable tab 1. Open Visual Studio and select **Open a project or solution**. Ensure that you keep the command prompt with ngrok running and make a note of th :::image type="content" source="~/assets/images/tab-images/channel-tab-aspnet-uploaded.png" alt-text="Screenshot shows that the channel tab is uploaded in Teams."::: - Your channel or group tab is successfully created and added in Teams. + Your configurable tab is successfully created and added in Teams. ::: zone-end If your app supports [configurable tab,](~/tabs/how-to/create-tab-pages/configur * [Build tabs for Teams](../what-are-tabs.md) * [Create a personal tab](create-personal-tab.md) * [Developer Portal for Teams](../../concepts/build-and-test/teams-developer-portal.md)-* [Build tabs with Adaptive Cards](build-adaptive-card-tabs.md) * [Add a SharePoint page as a tab in Teams](https://support.microsoft.com/en-us/office/add-a-sharepoint-page-list-or-document-library-as-a-tab-in-teams-131edef1-455f-4c67-a8ce-efa2ebf25f0b) * [App manifest schema for Teams](../../resources/schem) |
platform | Create Personal Tab | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/create-personal-tab.md | Title: Methods to Build Personal Tab App + Title: Methods to Build Tab App description: Learn to build a personal tab with Node.js, ASP.NET Core, or ASP.NET Core MVC, extending it to support group chats, channels, meetings, and offline access. ms.localizationpriority: high zone_pivot_groups: teams-app-environment Last updated 10/17/2024 -# Create a personal tab +# Create a tab -Personal tabs, along with personally scoped bots, are part of personal apps and are scoped to a single user. They can be pinned to the left pane for easy access. +Tabs in chats, channels, or meetings behave more like apps, as you can pin only one tab per app to the left pane for easy access. > [!IMPORTANT] > > * To learn how to create a tab with Teams Toolkit, see [build your first tab app using JavaScript](../../sbs-gs-javascript.yml). > * We've introduced the [Teams Toolkit Overview](../../toolkit/teams-toolkit-fundamentals.md) extension within Visual Studio Code. This version comes to you with many new app development features. We recommend that you use Teams Toolkit v5 for building your Teams app. -Ensure that you've all the [prerequisites](~/tabs/how-to/tab-requirements.md) to build your personal tab. +Ensure that you've all the [prerequisites](~/tabs/how-to/tab-requirements.md) to build your tab. [!INCLUDE [sdk-include](~/includes/sdk-include.md)] ::: zone pivot="node-java-script" -## Create a personal tab with Node.js +## Create a tab with Node.js 1. At the command prompt, install the [Yeoman](https://yeoman.io/) and [gulp-cli](https://www.npmjs.com/package/gulp-cli) packages by entering the following command after installing the Node.js: Ensure that you've all the [prerequisites](~/tabs/how-to/tab-requirements.md) to npm install generator-teams --global ``` -Following are the steps to create a personal tab: +Following are the steps to create a tab: -1. [Generate your application with a personal tab](#generate-your-application-with-a-personal-tab) -1. [Add a content page to the personal tab](#add-a-content-page-to-the-personal-tab) +1. [Generate your application with a tab](#generate-your-application-with-a-tab) +1. [Add a content page to the tab](#add-a-content-page-to-the-tab) 1. [Create your app package](#create-your-app-package) 1. [Build and run your application](#build-and-run-your-application)-1. [Establish a secure tunnel to your personal tab](#establish-a-secure-tunnel-to-your-tab) +1. [Establish a secure tunnel to your tab](#establish-a-secure-tunnel-to-your-tab) 1. [Upload your application to Teams](#upload-your-application-to-teams) -### Generate your application with a personal tab +### Generate your application with a tab -1. At the command prompt, create a new directory for your personal tab. +1. At the command prompt, create a new directory for your tab. 1. Enter the following command in your new directory to start the Microsoft Teams app generator: Following are the steps to create a personal tab: > In a tab, the tab home page appears only when the user selects the back button (or moves out of the tab) and comes back to the home page. The tab doesn't maintain or retain the previous state by design. </details> -### Add a content page to the personal tab +### Add a content page to the tab -Create a content page and update the existing files of the personal tab application: +Create a content page and update the existing files of the tab application: 1. Create a new **personal.html** file in your Visual Studio Code with the following markup: gulp build :::image type="content" source="~/assets/images/tab-images/homePage.png" alt-text="Default Tab"::: -1. Browse `http://localhost:3007/<yourDefaultAppNameTab>/personal.html`, to view your personal tab. +1. Browse `http://localhost:3007/<yourDefaultAppNameTab>/personal.html`, to view your tab. :::image type="content" source="~/assets/images/tab-images/personalTab.PNG" alt-text="Default html Tab"::: After your tab is uploaded to Microsoft Teams through **ngrok** and successfully 1. Select **Manage your apps** > **Upload an app** > **Upload a custom app**. 1. Go to your project directory, browse to the **./package** folder, select the zip folder, and choose **Open**. - :::image type="content" source="~/assets/images/tab-images/addingpersonaltab.png" alt-text="Adding your personal tab"::: + :::image type="content" source="~/assets/images/tab-images/addingpersonaltab.png" alt-text="Adding your tab"::: 1. Select **Add** in the dialog. Your tab is uploaded to Teams. :::image type="content" source="~/assets/images/tab-images/personaltabuploaded.png" alt-text="Personal tab uploaded"::: -1. In the left pane of Teams, select ellipses ●●● and then choose your uploaded app to view your personal tab. +1. In the left pane of Teams, select ellipses ●●● and then choose your uploaded app to view your tab. - Your personal tab is successfully created and added in Teams. You can also [reorder](#reorder-static-personal-tabs) your personal tab in Teams. + Your tab is successfully created and added in Teams. You can also [reorder](#reorder-tabs) your tabs in Teams. ::: zone-end ::: zone pivot="razor-csharp" -## Create a personal tab with ASP.NET Core +## Create a tab with ASP.NET Core 1. At the command prompt, create a new directory for your tab project. After your tab is uploaded to Microsoft Teams through **ngrok** and successfully git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git ``` -Following are the steps to create a personal tab: +Following are the steps to create a tab: -1. [Generate your application with a personal tab](#generate-your-application-with-a-personal-tab-1) +1. [Generate your application with a tab](#generate-your-application-with-a-tab-1) 1. [Update and run your application](#update-and-run-your-application) 1. [Establish a secure tunnel to your tab](#establish-a-secure-tunnel-to-your-tab-1) 1. [Update your app package with Developer Portal](#update-your-app-package-with-developer-portal) 1. [Preview your app in Teams](#preview-your-app-in-teams) -### Generate your application with a personal tab +### Generate your application with a tab 1. Open Visual Studio and select **Open a project or solution**. ngrok http 3978 --host-header=localhost :::image type="content" source="~/assets/images/tab-images/personaltabaspnetuploaded.png" alt-text="Default Tab"::: - Your personal tab is successfully created and added in Teams. You can also [reorder](#reorder-static-personal-tabs) your personal tab in Teams. + Your tab is successfully created and added in Teams. You can also [reorder](#reorder-tabs) your tab in Teams. ::: zone-end ::: zone pivot="mvc-csharp" -## Create a personal tab with ASP.NET Core MVC +## Create a tab with ASP.NET Core MVC 1. At the command prompt, create a new directory for your tab project. ngrok http 3978 --host-header=localhost git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git ``` -Following are the steps to create a personal tab: +Following are the steps to create a tab: -1. [Generate your application with a personal tab](#generate-your-application-with-a-personal-tab-2) +1. [Generate your application with a tab](#generate-your-application-with-a-tab-2) 1. [Update and run application](#update-and-run-your-application-1) 1. [Establish a secure tunnel to your tab](#establish-a-secure-tunnel-to-your-tab-2) 1. [Update your app package with Developer Portal](#update-your-app-package-with-developer-portal-1) 1. [Preview your app in Teams](#preview-your-app-in-teams-1) -### Generate your application with a personal tab +### Generate your application with a tab 1. Open Visual Studio and select **Open a project or solution**. ngrok http 3978 --host-header=localhost :::image type="content" source="~/assets/images/tab-images/personaltabaspnetmvccoreuploaded.png" alt-text="Personal tab"::: - Your personal tab is successfully created and added in Teams. You can also [reorder](#reorder-static-personal-tabs) your personal tab in Teams. + Your tab is successfully created and added in Teams. You can also [reorder](#reorder-tabs) your tab in Teams. ::: zone-end Use Teams Toolkit to create your first tab project. The toolkit takes you throug ### Take a tour of the source code for Teams tab app -After project creation, you've the components to build a basic personal app. You can view the project directory structure in the **Solution Explorer** pane of the Visual Studio. +After project creation, you've the components to build a basic tab app. You can view the project directory structure in the **Solution Explorer** pane of the Visual Studio. :::image type="content" source="../../assets/images/teams-toolkit-v2/blazor/blazor-app-solution-explorer_1.png" alt-text="Screenshot of Solution explorer displaying the components to build a basic personal app."::: You've completed the tutorial to build a tab app with Blazor. ::: zone-end -## Reorder static personal tabs +## Reorder tabs Starting with manifest version 1.7, developers can rearrange all tabs in their personal app. You can move the **bot chat** tab, which always defaults to the first position, anywhere in the personal app tab header. Two reserved tab `entityId` keywords are declared, **conversations** and **about**. Congratulations! You've successfully created a Teams tab with offline functional * [Share to Teams from personal app or tab](~/concepts/build-and-test/share-to-teams-from-personal-app-or-tab.md) * [Developer Portal for Teams](../../concepts/build-and-test/teams-developer-portal.md) * [App manifest schema for Teams](../../resources/schem)-* [Build tabs with Adaptive Cards](build-adaptive-card-tabs.md) * [Tabs on mobile](../design/tabs-mobile.md) |
platform | Content Page | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/create-tab-pages/content-page.md | The following code is an example of how your page and the Teams client communica *** -For more information on how to create and add a content page to a personal tab, see [add a content page to personal tab](../create-personal-tab.md#add-a-content-page-to-the-personal-tab). +For more information on how to create and add a content page to a personal tab, see [add a content page to the tab](../create-personal-tab.md#add-a-content-page-to-the-tab). The following images show the configuration of an HTML content page and the output of content page in tab: |
platform | Tab Navigation | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/tab-navigation.md | -- Title: Tab app navigation -description: Learn about options for navigating between tabs using the Microsoft Teams JavaScript client library (TeamsJS) and how to configure back button navigation. Previously updated : 05/31/2023------# Navigate within a tab app --The Microsoft Teams JavaScript client library (TeamsJS) provides support for navigation within a tab. This article discusses the options available, which include types of navigation such as between tabs within the app or through use of Teams UI components and the back button. ---Tabs provide a great way to enhance the Microsoft Teams experience. You can provide users access to your web application right within Teams using tabs, without having to sign in again. For more information about tabs, and how you can extend personal tabs across Microsoft 365 products, see [Build tabs for Teams](~/tabs/what-are-tabs.md) and [Extend a Teams personal tab across Microsoft 365](~/m365-apps/extend-m365-teams-personal-tab.md). --## Navigate between tabs --The [pages](/javascript/api/@microsoft/teams-js/pages) capability of the TeamsJS library provides support for navigation between tabs within an app. Specifically, the [`pages.currentApp`](/javascript/api/@microsoft/teams-js/pages.currentapp) namespace offers a function `navigateTo(NavigateWithinAppParams)` to allow navigation to a specific tab within the current app and a function `navigateToDefaultPage()` to navigate to the first tab defined in the app's manifest. --The following code illustrates how to navigate to a specific page: --```typescript -if (pages.currentApp.isSupported()) { - const navPromise = pages.currentApp.navigateTo({pageId: <pageId>, subPageId: <subPageId>}); - navPromise. - then((result) => {/*Successful navigation*/}). - catch((error) => {/*Failed navigation*/}); -} -else {/*Handle situation where capability isn't supported*/ - const navPromise = pages.navigateToApp({appId: <appId>, pageId: <pageId>}); - navPromise. - then((result) => {/*Successful navigation*/}). - catch((error) => {/*Failed navigation*/}); -} -``` --The following code illustrates how to navigate to the app's default tab: --```typescript --if (pages.currentApp.isSupported()) { - const navPromise = pages.currentApp.navigateToDefaultPage(); - navPromise. - then((result) => {/*Successful navigation*/}). - catch((error) => {/*Failed navigation*/}); -} -else {/*Handle situation where capability isn't supported*/} -``` --> [!NOTE] -> The tab app navigation is supported only in [new Teams client](/microsoftteams/platform/resources/teams-updates). --Use the [pages.navigateToApp()](/javascript/api/%40microsoft/teams-js/pages#@microsoft-teams-js-pages-navigatetoapp) function or [deep links](~/concepts/build-and-test/deep-link-application.md#configure-deep-link-to-a-tab-using-teamsjs) for tab app navigation. --## Configure back button navigation --When an app has multiple tabs, a user can use the Microsoft 365 host app's back button to go backwards through the navigational history. However, the history doesn't include the actions a user performs within a tab. If you want to enhance the back button experience, you can maintain your own internal navigation stack and configure a custom handler for back button selections. This can be accomplished through the `registerBackButtonHandler()` function in the [`pages.backStack`](/javascript/api/@microsoft/teams-js/pages.backstack) namespace. --After you register the handler, it helps you to address the navigational request before the system takes action. If the handler is able to manage the request, it should return `true` so that the system knows no further action is necessary. If the internal stack is empty, it should return `false` so that the system can call the `navigateBack()` function instead and take the appropriate action. --## Return focus to host app --After the user starts using elements within a tab, by default, the focus remains with the elements of your iFrame until the user selects outside of it. If the iFrame is a part of the user navigating with keyboard shortcuts (the Tab key or the F6 key), you can focus on the host app. You can focus on the host app by using the [`pages.returnFocus()`](/javascript/api/@microsoft/teams-js/pages#@microsoft-teams-js-pages-returnfocus) function. The `returnFocus()` function accepts a Boolean indicating the direction to advance focus within the host app; `true` for forward and `false` for backwards. Generally, forward highlights the search bar and backwards highlights the app bar. --## Code sample --|**Sample name** | **Description** |**Node.js**| -|-|--|--| -|Tab app navigation | Sample code shows how to navigate between tabs within the app. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-app-navigation/nodejs) --## See also --* [Extend a Teams personal tab across Microsoft 365](~/m365-apps/extend-m365-teams-personal-tab.md) -* [Build tabs for Teams](~/tabs/what-are-tabs.md) -* [Create a personal tab](~/tabs/how-to/create-personal-tab.md) -* [Create deep links](~/concepts/build-and-test/deep-links.md) |
platform | Using Fluid Msteam | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/using-fluid-msteam.md | This tutorial requires familiarity with the following concepts and resources: ## Create the project 1. Open a Command Prompt and navigate to the parent folder where you want to create the project, for example, `/My Microsoft Teams Projects`.-1. Create a Teams tab application by running the following command and [creating a channel tab](create-channel-group-tab.md#create-a-custom-channel-or-group-tab-with-nodejs): +1. Create a Teams tab application by running the following command and [creating a channel tab](create-channel-group-tab.md#create-a-configurable-tab-with-nodejs): ```cmd yo teams |
platform | Connectors Using | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/webhooks-and-connectors/how-to/connectors-using.md | These limits are in place to reduce spamming a channel by a connector and ensure * [Create Incoming Webhooks](~/webhooks-and-connectors/how-to/add-incoming-webhook.md) * [Create Outgoing Webhooks](~/webhooks-and-connectors/how-to/add-outgoing-webhook.md) * [Rate limiting for Teams bots messages](~/bots/how-to/rate-limit.md)-* [Build tabs with Adaptive Cards](../../tabs/how-to/build-adaptive-card-tabs.md) * [Format cards in Microsoft Teams](../../task-modules-and-cards/cards/cards-format.md) * [Adaptive Cards](../../task-modules-and-cards/what-are-cards.md#adaptive-cards) * [App manifest schema for Teams](../../resources/schem) |
platform | Whats New | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/whats-new.md | Teams platform features that are available to all app developers. **2024 October** +* ***October 29, 2024***: [Share content to live and upcoming meetings with Share to Teams](concepts/build-and-test/share-to-teams-from-web-apps.md). * ***October 28, 2024***: [Enable API key and SSO authentication for your API-based message extension](messaging-extensions/build-api-based-message-extension.md). * ***October 28, 2024***: [Update bot or message extension app to use certificate or MSI for authentication.](toolkit/update-bot-me-app-to-use-certificate-or-msi-for-authentication.md) * ***October 28, 2024***: [Debug apps in Teams desktop client to improve debugging performance and efficency](toolkit/debug-apps-in-Teams-desktop-client.md). Explore updates from the previous GA releases listed here. |04/08/2021| App customization feature | ΓÇó Design your apps > [Design teams app overview](concepts/design/enable-app-customization.md)</br> ΓÇó Tools and SDKs > [Developer Portal](concepts/build-and-test/teams-developer-portal.md) </br> ΓÇó App manifest > Public developer preview > [Manifest schema](resources/schem) | |03/18/2021| Notice: Update to version 4.10 or above of the Bot Framework SDK, as we've started with the deprecation process for `TeamsInfo.getMembers` and `TeamsInfo.GetMembersAsync`. | Build bots > [Bot API Changes for Team/Chat Members](resources/team-chat-member-api-changes.md) | |03/05/2021|Default install scope and group capability | Publish your app > [Default install scope and group capability](concepts/deploy-and-publish/add-default-install-scope.md) |-|03/05/2021|Reorder personal app tabs | Build tabs > [Reorder the chat tab in personal apps](tabs/how-to/create-personal-tab.md#reorder-static-personal-tabs) | +|03/05/2021|Reorder personal app tabs | Build tabs > [Reorder the chat tab in personal apps](tabs/how-to/create-personal-tab.md#reorder-tabs) | |03/04/2021|Information masking in Adaptive cards | Build cards and task modules > Build cards > [Information masking in Adaptive cards](task-modules-and-cards/cards/cards-format.md#information-masking-in-adaptive-cards) | |02/19/2021|Added location capabilities. | ΓÇó App fundamentals > Device capabilities > [Overview](concepts/device-capabilities/device-capabilities-overview.md) </br> ΓÇó App fundamentals > Device capabilities > [Request device permissions](concepts/device-capabilities/native-device-permissions.md) </br> ΓÇó App fundamentals > Device capabilities > [Integrate media capabilities](concepts/device-capabilities/media-capabilities.md) </br> ΓÇó App fundamentals > Device capabilities > [Integrate QR or barcode scanner capability](concepts/device-capabilities/qr-barcode-scanner-capability.md) </br> ΓÇó App fundamentals > Device capabilities > [Integrate location capabilities](concepts/device-capabilities/location-capability.md) | |02/18/2021|Added QR or barcode scanner capability.| ΓÇó App fundamentals > Device capabilities > [Overview](concepts/device-capabilities/device-capabilities-overview.md) </br> ΓÇó App fundamentals > Device capabilities > [Request device permissions](concepts/device-capabilities/native-device-permissions.md) </br> ΓÇó App fundamentals > Device capabilities > [Integrate media capabilities](concepts/device-capabilities/media-capabilities.md) </br> ΓÇó App fundamentals > Device capabilities > [Integrate QR or barcode scanner capability](concepts/device-capabilities/qr-barcode-scanner-capability.md) | |