diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index 9c01057467b..696f24149b8 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -1,5 +1,17 @@ { "redirections": [ + { + "source_path": "msteams-platform/m365-apps/actions-in-m365-quick-start-guide.md", + "redirect_url": "/microsoftteams/platform/overview" + }, + { + "source_path": "msteams-platform/m365-apps/actions-in-m365.md", + "redirect_url": "/microsoftteams/platform/overview" + }, + { + "source_path": "msteams-platform/m365-apps/build-actions-in-m365.md", + "redirect_url": "/microsoftteams/platform/overview" + }, { "source_path": "msteams-platform/concepts/building-an-app.md", "redirect_url": "/microsoftteams/platform/overview" diff --git a/msteams-platform/TOC.yml b/msteams-platform/TOC.yml index 9a1a63fe63a..575ca795863 100644 --- a/msteams-platform/TOC.yml +++ b/msteams-platform/TOC.yml @@ -1043,17 +1043,6 @@ - name: Add an Outlook Add-in to a Teams app href: m365-apps/combine-office-add-in-and-teams-app.md displayName: Microsoft 365, Office 365, Outlook add-in, integrate Outlook Add-in to Teams, Teams app Outlook Add-in - - name: Actions in Microsoft 365 - items: - - name: What are Actions? - href: m365-apps/actions-in-m365.md - displayName: actions design - - name: Build Actions in Microsoft 365 - href: m365-apps/build-actions-in-m365.md - displayName: build actions, retrieve action - - name: Actions in Microsoft 365 quick start guide - href: m365-apps/actions-in-m365-quick-start-guide.md - displayName: run in Azure - name: Publish Teams apps for Microsoft 365 href: m365-apps/publish.md - name: Test your agent or app diff --git a/msteams-platform/m365-apps/actions-in-m365-quick-start-guide.md b/msteams-platform/m365-apps/actions-in-m365-quick-start-guide.md deleted file mode 100644 index 7759662c273..00000000000 --- a/msteams-platform/m365-apps/actions-in-m365-quick-start-guide.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Get Started - Actions in Microsoft 365 -description: In this article, learn how to build and run the sample app for Actions in Microsoft 365 using Microsoft 365 Agents Toolkit in Visual Studio Code, its functions and use cases. -ms.date: 03/16/2026 -ms.author: mosdevdocs -author: v-preethah -ms.topic: quickstart -ms.subservice: m365apps ---- -# Actions in Microsoft 365 Quick start guide - -> [!NOTE] -> -> * Actions are available in [public developer preview](../resources/dev-preview/developer-preview-intro.md). -> * Actions are supported for Microsoft 365 (Office) app for web and desktop. - -Get started with Actions in Microsoft 365, which helps integrate an app into the user's workflow by enabling easy discoverability and seamless interaction with their content. - -## Prerequisites - -[!INCLUDE [prerequisites-actions-m365](../includes/get-started/prerequisites-actions-m365.md)] - -### Build and run the sample app - -Let's learn how to build and run a sample app in your local environment. You'll use Microsoft 365 Agents Toolkit (previously known as Teams Toolkit) for Visual Studio Code to setup and upload the application to your tenant. Let’s get started! - -1. Go to the [sample](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/TeamsJS/m365-actions-preview/nodejs). - -1. Select **Code**. - -1. From the dropdown menu, select **Open with GitHub Desktop**. - - :::image type="content" source="~/assets/images/include-files/clone-repository.png" alt-text="Screenshot show the option to clone repository in local."::: - -1. Select **Clone**. - -1. Go to Visual Studio Code. - -1. Select **File** > **Open Folder...**. - -1. Select the folder where your app is created. - -1. Select **Select Folder**. - -1. From the left pane, select **Run and Debug (Ctrl+Shift+D)**. - -1. Select the **F5** key to start debugging. - - :::image type="content" source="images/actions-debug.png" alt-text="The screenshot shows actions in debug."::: - -A browser window opens with Microsoft 365 home page and your app is available under **Apps**. - -You can try your Actions in the Microsoft 365 home page, right-click a Word, Excel, or PPT file. You can see **Related tasks** in the context menu. Hover over **Add to** to view the **Add todo task** action. - -:::image type="content" source="images/actions-context-menu.png" alt-text="The screenshot shows the actions in context menu."::: - -[!INCLUDE [m365-app-rename](~/includes/m365-app-rename.md)] - -If you want to run Actions in the Microsoft 365 on Azure, see [sample.](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/TeamsJS/m365-actions-preview/nodejs/README.md#optional-deploy-the-app-to-azure) diff --git a/msteams-platform/m365-apps/actions-in-m365.md b/msteams-platform/m365-apps/actions-in-m365.md deleted file mode 100644 index f21770e108d..00000000000 --- a/msteams-platform/m365-apps/actions-in-m365.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: Introduction - Actions in Microsoft 365 -description: In this article, learn more about the function of Actions in Microsoft 365, how Actions work, design guidelines, and its use cases. -ms.date: 11/16/2023 -ms.topic: conceptual -ms.subservice: m365apps ---- -# Actions in Microsoft 365 - -> [!NOTE] -> -> * Actions are available in [public developer preview](../resources/dev-preview/developer-preview-intro.md). -> * Actions are supported for Microsoft 365 (Office) app for web and desktop. - -Actions aim to integrate your app into your user's workflow by enabling easy discoverability and seamless interaction with their content. Actions enable efficient task completion by directing users to your app with their intent and contextual content. The integration enhances the visibility and engagement of your app with minimal development effort. - -The following graphic is an example of an Action that directs user to view list of suppliers related to the file: - -:::image type="content" source="images/actions-in-m365-app.gif" alt-text="Graphic shows the user right-clicks on the excel file and select the related suppliers."::: - -| Steps | Description | -| --- | --- | -| 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 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 - -Actions are built using an intent, object, and handler. When a user aims to complete a task it's called an Action, and the Action is represented by the intent and object. The intent serves as the verb, outlining the user's intended action, while the object is the noun on which the action is performed. For example, opening a file is an intent and the file is an object. You must consider the user's intent and object as the input and create the appropriate handler to enable task completion for the user. - -To build an action, you must define the intent, object, and handler in the app manifest and use Teams JavaScript library (Teams JS) to get the Action details to make it easy for the users to do specific tasks. - -The following table lists the required elements and support information for Actions: - -|   | Name | Description | What is supported in this preview  -| --- | --- | --- | ---| -|   | 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 personal tab, providing them with a rich and expansive interface to accomplish their goals. | - -## Design guidelines - -Create app icons and display names in a context menu for Actions. A single action shows the essence of your app, and by designing the visual connection between the app icon and its display name, you can enhance both the look and the function. - -:::image type="content" source="images/app-icon-context-menu.png" alt-text="The screenshot shows the app icon in context menu."::: - -* Start with the intent name, typically represented by a verb, such as `Open` or `Add to` and followed by a term that describes your app or what your action does. - -* Ensure that the first letter is capitalized. When using a brand name, only the first letter of the brand name should be capitalized. - -The following image is an anatomy of an icon slot: - -:::image type="content" source="images/icon-slot.png" alt-text="The screenshot shows the icon slot in context menu."::: - -### Display name - -The following table provides guidance on the do’s and don’ts for the display name: - -| ✔️ **Do's** | ❌ **Don't** | -| --- | --- | -|Add to Todo: Add to represents the intent and Todo is the app name.|Avoid using Contoso as the only app name, as it doesn't adequately convey the app's functionality.| -|Open in Contoso: Open represents the intent and Contoso is the app name.|Open PDF, Word, PPT, or TXT files in Contoso is too long.| -|Add to dashboard: Add to represents the intent and Contoso is the app name. However, dashboard provides a more accurate description of the use case.|Custom sign document: Custom intent, no need to include custom in the display name. Start with the intent description with a verb.| -|Request signatures: Start with the custom intent, followed by a comprehensive description of the action. The brand name or object name, Contoso sign, isn't necessarily required.| | -|Convert to PDF: Start with the custom intent, which is identified as the verb, to clearly express the action in the Contoso app.| - -The following image is an example of correct and incorrect ways to format a sample name: - -:::image type="content" source="images/do-and-dont.png" alt-text="Screenshot shows the do and don't of the sample display name." lightbox="images/do-and-dont.png"::: - -### Context menu - -An Action in the context menu contains an app icon and display name. - -The following images are an example of flat list and grouped intents in a context menu: - -#### [Flat list](#tab/flatlist) - -:::image type="content" source="images/context-menu-flat-list.png" alt-text="Screenshot shows the custom intent as a flat list at the end of the context menu."::: - -#### [Grouped](#tab/groupedlist) - -:::image type="content" source="images/grouped-by-intent.png" alt-text="Screenshot shows the Actions grouped by intent in the context menu."::: - ---- - -> [!NOTE] -> -> The Microsoft 365 platform determines the placement of Actions. - -## Next step - -> [!div class="nextstepaction"] -> [Build Actions in Microsoft 365](build-actions-in-m365.md) diff --git a/msteams-platform/m365-apps/build-actions-in-m365.md b/msteams-platform/m365-apps/build-actions-in-m365.md deleted file mode 100644 index ebf316d3b40..00000000000 --- a/msteams-platform/m365-apps/build-actions-in-m365.md +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: Create Actions in Microsoft 365 -description: Learn how to build Actions, configure app manifest, retrieve Actions information through context object, access content through Graph API, preinstall Actions. -ms.date: 03/16/2026 -author: v-preethah -ms.topic: conceptual -ms.subservice: m365apps ---- - -# Build Actions in Microsoft 365 - -> [!NOTE] -> -> Actions are available in [public developer preview](../resources/dev-preview/developer-preview-intro.md). - -When you create an app ensure that you define user intent, determine the object to perform the action, and construct the corresponding handler that facilitates task completion for the user. - -To build Actions for your app, follow these steps: - -1. [Prerequisites](#prerequisites). -1. [Configure app manifest](#configure-app-manifest). -1. [Retrieve Action information through context object](#retrieve-action-information-through-context-object). -1. [Access content through Graph API](#access-content-through-graph-api). - -## Prerequisites - -[!INCLUDE [prerequisites-actions-m365](../includes/get-started/prerequisites-actions-m365.md)] - -## Configure app manifest - -Add the `actions` property and define the intent, object, and handler for your actions in the app manifest (previously called Teams app manifest). - -The following is an app manifest example for Actions that can be triggered on files such as Excel, Word, PDF, or PowerPoint: - -```json -{ - "$schema": "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json", - "manifestVersion": "devPreview", - - "actions": [ - { - "id": "relatedTasks", - "displayName": "Related tasks", - "intent": "custom", - "description": "Shows tasks in the To do app that are related to this file.", - "handlers": [ - { - "type": "openPage", - "supportedObjects": { - "file": { - "extensions": ["xlsx", "doc", "docx", "pdf", "pptx", "ppt"] - } - }, - "pageInfo": { - "pageId": "index", - } - } - ] - } - ] -} -``` - -For more information, see [app manifest schema](/microsoft-365/extensibility/schema/element-actions). - -When a user selects an action to open a personal tab and view related tasks in an app based on the selected file. The app uses the `"intent": "custom"` property to identify the file type, such as .xlsx or doc and the `"type": "openPage"` handler opens the app and navigates to the `pageId`. - -## Retrieve Action information through context object - -Build the handler to receive the Action information through the [context object](/javascript/api/%40microsoft/teams-js/app.context?view=msteams-client-js-latest&preserve-view=true) to create a seamless user experience for performing users specific tasks using the [Teams JavaScript library (TeamsJS)](/javascript/api/@microsoft/teams-js). - -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 tab from an Action and the content that initiated the Action. - -```javascript -app.getContext().then((context) => { - const actionInfo = context.actionInfo; - if (actionInfo) { - // App was launched using an action    - } - if (actionInfo && actionInfo.actionId == 'myActionId1') { - // Handle specific action    - } - if (actionInfo) { - if (actionInfo.actionObject.type == app.ActionObjectType.M365Content) { - const itemId = actionInfo.actionObjects[0].itemId; - // Get the requested content from Microsoft Graph by item id: - } - } -}) -``` - -|   | Name | Description | -| --- | --- | --- | -|   | `actionObjects` | Array of corresponding action objects. | -|   | `itemId` | The app receives the ID as the content and uses it to query the Microsoft Graph. | -|   | `actionInfo` | The context object contains an object that holds all the information related to the current action. | - -## Access content through Graph API - -After obtaining the `itemId` of the triggering content, you can use the [Graph API](/graph/api/driveitem-get?view=graph-rest-1.0&tabs=http&preserve-view=true) to read or modify the content, facilitating task completion for your users. - -**HTTP request** - -```http -GET /users/{user-id}/drive/items/{item-id} -``` - -## Upload your custom app using Microsoft 365 Agents Toolkit - -After you update the app package with the required information, you're ready to test your Actions in the Microsoft 365 Agents Toolkit (previously known as Teams Toolkit). To initiate debugging, select the **F5** key. - - :::image type="content" source="images/actions-debug.png" alt-text="The screenshot shows actions in debug."::: - -A browser window opens with Microsoft 365 home page and your app is available under **Apps**. - -You can now preview your Actions in the Microsoft 365 home page, right-click a file that is supported by your Actions. Actions appear in the context menu, for example **Add todo task**. - -:::image type="content" source="images/actions-context-menu.png" alt-text="The screenshot shows the actions in context menu."::: - -[!INCLUDE [m365-app-rename](~/includes/m365-app-rename.md)] - -## Preinstall Actions for users in Microsoft 365 Admin Center - -> [!NOTE] -> Actions are available in public developer preview, ensure that you enable [targeted release](/microsoft-365/admin/manage/release-options-in-office-365?view=o365-worldwide&preserve-view=true) to the users to experience Actions in Microsoft 365 app. - -To use an app with Actions in your tenant, an admin must upload the app package with devPreview manifest to the Microsoft Admin Center as follows: - -1. Go to [Microsoft Admin Center](https://admin.microsoft.com/AdminPortal#/homepage). - -1. Select **Settings** > **Integrated Apps** > **Upload custom apps**. - -Follow instructions to preinstall your app for entire organization or user groups within your tenant. - -## Code sample - -| **Sample name** | **Description** |**Node.js** | -|-----------------|-----------------|----------------| -| Actions in Microsoft 365 apps | This sample demonstrates how to build Teams apps using Actions in the Microsoft 365 app to streamline task management and enhance productivity by minimizing context switching. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/TeamsJS/m365-actions-preview/nodejs)| - -## Next step - -> [!div class="nextstepaction"] -> [Actions in Microsoft 365 quick start guide](actions-in-m365-quick-start-guide.md) diff --git a/msteams-platform/m365-apps/images/actions-context-menu.png b/msteams-platform/m365-apps/images/actions-context-menu.png deleted file mode 100644 index ba5f6eb8e3c..00000000000 Binary files a/msteams-platform/m365-apps/images/actions-context-menu.png and /dev/null differ diff --git a/msteams-platform/m365-apps/images/actions-debug.png b/msteams-platform/m365-apps/images/actions-debug.png deleted file mode 100644 index be5077abad6..00000000000 Binary files a/msteams-platform/m365-apps/images/actions-debug.png and /dev/null differ diff --git a/msteams-platform/m365-apps/images/actions-in-m365-app.gif b/msteams-platform/m365-apps/images/actions-in-m365-app.gif deleted file mode 100644 index bd40cd1f8fb..00000000000 Binary files a/msteams-platform/m365-apps/images/actions-in-m365-app.gif and /dev/null differ diff --git a/msteams-platform/m365-apps/images/app-icon-context-menu.png b/msteams-platform/m365-apps/images/app-icon-context-menu.png deleted file mode 100644 index 167c0c56e62..00000000000 Binary files a/msteams-platform/m365-apps/images/app-icon-context-menu.png and /dev/null differ diff --git a/msteams-platform/m365-apps/images/context-menu-flat-list.png b/msteams-platform/m365-apps/images/context-menu-flat-list.png deleted file mode 100644 index cfde119b513..00000000000 Binary files a/msteams-platform/m365-apps/images/context-menu-flat-list.png and /dev/null differ diff --git a/msteams-platform/m365-apps/images/do-and-dont.png b/msteams-platform/m365-apps/images/do-and-dont.png deleted file mode 100644 index f856b3dffcd..00000000000 Binary files a/msteams-platform/m365-apps/images/do-and-dont.png and /dev/null differ diff --git a/msteams-platform/m365-apps/images/grouped-by-intent.png b/msteams-platform/m365-apps/images/grouped-by-intent.png deleted file mode 100644 index 4560979c349..00000000000 Binary files a/msteams-platform/m365-apps/images/grouped-by-intent.png and /dev/null differ diff --git a/msteams-platform/m365-apps/images/icon-slot.png b/msteams-platform/m365-apps/images/icon-slot.png deleted file mode 100644 index 0eaab0ff3de..00000000000 Binary files a/msteams-platform/m365-apps/images/icon-slot.png and /dev/null differ diff --git a/msteams-platform/m365-apps/overview.md b/msteams-platform/m365-apps/overview.md index cbc1ba95b44..e04f3be3dd4 100644 --- a/msteams-platform/m365-apps/overview.md +++ b/msteams-platform/m365-apps/overview.md @@ -77,12 +77,6 @@ Meeting apps are essentially [personal tabs](#personal-tabs) that are designed t For more information, see [Apps for meetings and calls](/microsoftteams/platform/apps-in-teams-meetings/teams-apps-in-meetings) and [Extend a meeting app to Outlook](/microsoftteams/platform/m365-apps/extend-m365-meeting-app). -## Actions in Microsoft 365 - -Actions aim to integrate your app into your user's workflow by enabling easy discoverability and seamless interaction with their content. By directing users to your app with their intent and contextual content, Actions enable efficient task completion. This integration enhances the visibility and engagement of your app with minimal development effort. - -For more information, see [Actions in Microsoft 365](actions-in-m365.md). - ## Platform support The following table shows platforms supporting the various types of apps for Microsoft 365. diff --git a/msteams-platform/whats-new.md b/msteams-platform/whats-new.md index b66f71b4894..a2588850db8 100644 --- a/msteams-platform/whats-new.md +++ b/msteams-platform/whats-new.md @@ -546,7 +546,6 @@ Developer preview is a public program that provides early access to unreleased T | 15/03/2024 | Extend static tabs to channels with a customizable experience. | [Build tabs for Teams](tabs/what-are-tabs.md) | | 12/02/2024 | Build API-based message extension using Developer Portal for Teams. | Build message extension > [Build API-based message extension](messaging-extensions/build-api-based-message-extension.md) | | 06/02/2024 | Introduced `systemDefault` reserved activity type for send activity feed notifications| Build tabs > [Send activity feed notifications](tabs/send-activity-feed-notification.md#requirements-to-use-the-activity-feed-notification-apis)| -|25/01/2024| Actions help to integrate your app into your user's workflow by enabling easy discoverability and seamless interaction with the content. | Extend your app across Microsoft 365 > [Actions in Microsoft 365](m365-apps/actions-in-m365.md)| |12/01/2024| Introduced Teams Toolkit command line interface v3. | Tools and SDKs > Tools > [Teams Toolkit command line interface](toolkit/teams-toolkit-CLI.md)|