Service | Microsoft Docs article | Related commit history on GitHub | Change details |
---|---|---|---|
platform | Share To Teams From Personal App Or Tab | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab.md | Title: Share to Teams from personal app or tab -description: Learn how to enable the Share to Teams button on your personal app or tab, limitations and end user experience. +description: Learn how to enable the Share to Teams button on your personal app or tab, limitations, and end user experience. ms.localizationpriority: medium Last updated 12/13/2022 Share to Teams allows users to share the content from personal app or tab to oth The following image shows the Share to Teams pop-up window: +# [Desktop](#tab/desktop) +++# [Mobile](#tab/mobile) +++ ## Enable Share to Teams button The following table provides the response codes: ## Limitations -* The Share to Teams is available for the desktop client, but it isn't supported on web and mobile clients. +* The Share to Teams is available for the Teams desktop and mobile clients, but it isn't supported on Teams web client. * The Share to Teams button can be hosted or embedded in an app running inside Teams.-* You can add Share to Teams button to the app created by using **Teams Javascript client library**. +* You can add Share to Teams button to the app created by using [Teams JavaScript client library](../../tabs/how-to/using-teams-client-library.md). ## End user Share to Teams experience |
platform | Feedback | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/feedback.md | Submit documentation feedback or updates using the community help channels. | **Community channel** | **Contact** | |:--|:--|-| **Documentation issues** | Select **This page** in the **Submit and view feedback** section available at the footer of the documentation, to open an [issue](https://github.com/MicrosoftDocs/msteams-docs/issues) on the [Microsoft Teams documentation GitHub](https://github.com/MicrosoftDocs/msteams-docs) repository.<br/><br/>:::image type="icon" source="assets/icons/alert-icon.png" border="false"::: **This page** option will be deprecated soon. <br/>:::image type="content" source="assets/images/community-feedback-this-page.png" alt-text="This page feedback"::: <br> You can also select whether the article was helpful or not on the articleΓÇÖs page. Select :::image type="icon" source="assets/icons/feedback-icon.png" border="false"::: **Feedback** in the upper-right corner of the article. Select **Yes** or **No**, provide additional context in the text field and select **Submit**. <br/>:::image type="content" source="assets/images/community-feedback.png" alt-text="Screenshot shows the feedback option in the article.":::<br> If you want to provide additional feedback, you can reach out to the community help through [Microsoft Q&A](#developer-community-forums).| +| **Documentation issues** | Select **This page** in the **Submit and view feedback** section available at the footer of the documentation, to open an [issue](https://github.com/MicrosoftDocs/msteams-docs/issues) on the [Microsoft Teams documentation GitHub](https://github.com/MicrosoftDocs/msteams-docs) repository.<br/><br/>:::image type="icon" source="assets/icons/alert-icon.png" border="false"::: **This page** option will be deprecated by May 31, 2024. <br/><br/>:::image type="content" source="assets/images/community-feedback-this-page.png" alt-text="This page feedback"::: <br><br/> You can also select whether the article was helpful or not on the articleΓÇÖs page. Select :::image type="icon" source="assets/icons/feedback-icon.png" border="false"::: **Feedback** in the upper-right corner of the article. Select **Yes** or **No**, provide additional context in the text field and select **Submit**. <br/>:::image type="content" source="assets/images/community-feedback.png" alt-text="Screenshot shows the feedback option in the article.":::<br> If you want to provide additional feedback, you can reach out to the community help through [Microsoft Q&A](#developer-community-forums).| |**Documentation updates**|Select **Edit** at the top right of the article you want to update, and submit a pull request to the :::image type="icon" source="assets/icons/GitHub-icon.png"::: [Microsoft Teams documentation GitHub](https://github.com/MicrosoftDocs/msteams-docs) repository. <br /> :::image type="content" source="assets/images/community-feedback-edit.png" alt-text="edit option":::| ### Feature request and general help |
platform | Grant Resource Specific Consent | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/graph-api/rsc/grant-resource-specific-consent.md | The default value of the property `isUserPersonalScopeResourceSpecificConsentEna <b> After March 14th, 2024 </b> -Admins adjust team and chat RSC settings through PowerShell cmdlets. The following are the available states for the PowerShell settings and each section shows examples of how to use these states to adjust your settings: +Before you manage your team and chat RSC settings with PowerShell, you need to connect PowerShell to your tenant using Microsoft Graph. For more information on managing Microsoft Graph settings with PowerShell, see [get started with the Microsoft Graph PowerShell SDK](/powershell/microsoftgraph/get-started). +You can use the `Connect-MgGraph` cmdlet and connect with the following permissions: ++1. `TeamworkAppSettings.ReadWrite.All` +1. `Policy.ReadWrite.Authorization` +1. `Policy.ReadWrite.PermissionGrant` +1. `AppCatalog.Read.All` ++The following are the available states for the PowerShell settings and each section shows examples of how to use these states to adjust your settings: | PowerShell State | Description | | - | - | |
platform | Actions In M365 | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/m365-apps/actions-in-m365.md | The following graphic is an example of an Action that directs user to view list | | | | 1 | In Microsoft 365, the user right-clicks on the Excel file. A context menu appears.| | 2 | The user selects **Related suppliers** to view the list of suppliers for the Northwind company.|-| 3 | The Northwind page opens with the list of suppliers mentioned in the Excel file. The user saves time by checking the result with a single click on the Excel file without manually opening the file each time.| +| 3 | The Northwind personal tab opens with the list of suppliers mentioned in the Excel file. The user saves time by checking the result with a single click on the Excel file without manually opening the file each time.| ## Understand how Actions work The following table lists the required elements and support information for Acti | | | | | | | Intent | Intent is the objective a user wants to perform or achieve. Intent is typically represented by a verb, such as `Open`, `Add to`, or any other actions that a user intends to perform. Microsoft 365 uses intent to display Actions in locations that align with the user’s needs and intentions. Intent determines the placement of Actions. | You can create an intent for `Open`, `Add to`, and `custom` Actions. You can use `custom` Action to create a tailored action. | | | Object  | Object is the file on which the user wants to perform an action. Object represents the noun or context that defines what the user wants to perform an action on.  | Actions can be triggered on content objects (files) that have an extension, such as Word, PowerPoint, Excel, PDF, and images. The files must be available in OneDrive or SharePoint and must be accessible through Microsoft Graph. |-| | Handlers | A handler refers to the method to fulfill the user's intent and perform the desired action on the specified object. Handler is responsible for implementing the logic and functionality of the Action, ensuring a seamless and meaningful user experience. | Actions support the `openPage` handler. The `openPage` handler allows you to directly guide users to your app's personal tab. The `openPage` handler helps you to drive users to your app's dedicated pages, providing them with a rich and expansive interface to accomplish their goals. | +| | Handlers | A handler refers to the method to fulfill the user's intent and perform the desired action on the specified object. Handler is responsible for implementing the logic and functionality of the Action, ensuring a seamless and meaningful user experience. | Actions support the `openPage` handler. The `openPage` handler allows you to directly guide users to your app's personal tab. The `openPage` handler helps you to drive users to your app's dedicated personal tab, providing them with a rich and expansive interface to accomplish their goals. | ## Design guidelines |
platform | Build Actions In M365 | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/m365-apps/build-actions-in-m365.md | Build the handler to receive the Action information through the [context object] When a user selects Add option from the app's context menu, a personal tab opens with the help of the `openPage` property in the app manifest. Your app can access contextual information about the invoked Action from the `actionInfo` property of the `app.getContext()` context object. -The [ActionInfo](/javascript/api/@microsoft/teams-js/actioninfo) interface helps to enable your app to determine when a user opens a page from an Action and the content that initiated the Action. +The [ActionInfo](/javascript/api/@microsoft/teams-js/actioninfo) interface helps to enable your app to determine when a user opens a tab from an Action and the content that initiated the Action. ```javascript app.getContext().then((context: app.Context) => { |
platform | Respond To Task Module Submit | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/messaging-extensions/how-to/action-commands/respond-to-task-module-submit.md | For more information on responding to the initial `fetchTask` event, see [respon ### Respond to botMessagePreview send -After the user selects the **Send**, you receive a `composeExtensions/submitAction` invoke with `value.botMessagePreviewAction = send`. Your web service must create and send a proactive message with the Adaptive Card to the conversation, and also reply to the invoke. +After the user selects the **Send**, you receive a `composeExtensions/submitAction` invoke with `value.botMessagePreviewAction = send`. Your web service must create and send a message with the Adaptive Card to the conversation, and also reply to the invoke. # [C#/.NET](#tab/dotnet) To use the user attribution in teams, you must add the `OnBehalfOf` mention enti # [C#/.NET](#tab/dotnet-1) ```csharp+// Attribute the message to the user on whose behalf the bot is posting + responseActivity.ChannelData = new { OnBehalfOf = new [] { new To use the user attribution in teams, you must add the `OnBehalfOf` mention enti DisplayName = turnContext.Activity.From.Name } }+ }; ++``` +# [JavaScript/Node.js](#tab/javascript-1) ++```javascript + const responseActivity = { type: 'message', attachments: [adaptiveCard], channelData: { + onBehalfOf: [ { + itemId: 0, + mentionType: 'person', + mri: context.activity.from.id, + displayname: context.activity.from.name + } + ] + }}; ``` + # [JSON](#tab/json-1) ```json |
platform | Tab Sso Code | https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/authentication/tab-sso-code.md | Use `getAuthToken()` at the time when you need access token for the current app | If access token is needed... | Call getAuthToken()... | | | |-| When app user accesses the app | After `microsoftTeams.initialize()`. | +| When app user accesses the app | After `microsoftTeams.app.initialize()`. | | To use a particular functionality of the app | When the app user takes an action that requires signing in. | ### Add code for getAuthToken Add JavaScript code snippet to the tab app to: The following code snippet shows an example of calling `getAuthToken()`. ```javascript-microsoftTeams.initialize(); -var authTokenRequest = { - successCallback: function(result) { console.log("Success: " + result); }, - failureCallback: function(error) { console.log("Error getting token: " + error); } -}; -microsoftTeams.authentication.getAuthToken(authTokenRequest); +microsoftTeams.app.initialize().then(() => { + getClientSideToken() + .then((clientSideToken) => { + return getServerSideToken(clientSideToken); + }) + .then((profile) => { + return useServerSideToken(profile); + }) + .catch((error) => { + ... + }) +} ++ function getClientSideToken() { ++ return new Promise((resolve, reject) => { + display("1. Get auth token from Microsoft Teams"); + + microsoftTeams.authentication.getAuthToken().then((result) => { + display(result); ++ resolve(result); + }).catch((error) => { + reject("Error getting token: " + error); + }); + }); + } ``` You can add calls of `getAuthToken()` to all functions and handlers that initiate an action where the token is needed. If you need to pass the access token to get Microsoft Graph data, see [Extend ta The following code shows an example of passing the access token to the server-side. The token is passed in an `Authorization` header when sending a request to a server-side web API. This example sends JSON data, so it uses the `POST` method. The `GET` is sufficient to send the access token when you're not writing to the server. ```javascript-$.ajax({ - type: "POST", - url: "/api/DoSomething", - headers: { - "Authorization": "Bearer " + accessToken - }, - data: { /* some JSON payload */ }, - contentType: "application/json; charset=utf-8" -}).done(function (data) { - // Handle success -}).fail(function (error) { - // Handle error -}).always(function () { - // Cleanup -}); +function getServerSideToken(clientSideToken) { + return new Promise((resolve, reject) => { + microsoftTeams.app.getContext().then((context) => { + fetch('/getProfileOnBehalfOf', { + method: 'post', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + 'tid': context.user.tenant.id, + 'token': clientSideToken + }), + mode: 'cors', + cache: 'default' + }) + .then((response) => { + if (response.ok) { + return response.json(); + } else { + reject(response.error); + } + }) + .then((responseJson) => { + if (responseJson.error) { + reject(responseJson.error); + } else { + const profile = responseJson; ++ resolve(profile); + } + }); + }); + }); + } + ``` ### Validate the access token |
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 February** +* ***February 15, 2024***: [Share to Teams from personal app or tab for mobile clients.](concepts/build-and-test/share-to-teams-from-personal-app-or-tab.md) * ***February 01, 2024***: [Use Adaptive Card-based Loop components to build collaborative experiences within Teams message extensions that work across Microsoft 365.](m365-apps/cards-loop-component.md) * ***February 01, 2024***: [Use application RSC permissions for chat scope.](graph-api/rsc/resource-specific-consent.md#rsc-permissions-for-a-chat-or-meeting) Discover Microsoft Teams platform features that are deprecated. You can now get Teams platform features that aren't available. +* ***February 16,2024***: The feedback option, **This page**, located in the **Submit and view feedback** section of the article, will be deprecated by May 31, 2024. You can select :::image type="icon" source="assets/icons/feedback-icon.png" border="false"::: **Feedback** in the upper-right corner of the article to submit feedback. + * ***February 07, 2024***: 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 you to rebuild the tab as a [web-based tab](tabs/what-are-tabs.md). * ***February 02, 2024***: Teams, Outlook, and Microsoft 365 web domains are migrating to *cloud.microsoft* domain. [Configure your app](m365-apps/extend-m365-teams-personal-tab.md#configure-content-security-policy-headers) before June 2024 to ensure continued functionality. |