與 Microsoft 小組 Azure BoardsAzure Boards with Microsoft Teams

Azure Boards |Azure DevOps Server 2020Azure Boards | Azure DevOps Server 2020

如果您使用 Microsoft 小組,您可以從小組頻道建立工作專案,並監視您 Azure Boards 專案中的工作專案活動。If you use Microsoft Teams, you can create work items and monitor work item activity in your Azure Boards project from your Teams channel. 您可以將 Microsoft 團隊的 Azure Boards 應用程式 新增至您的小組頻道,以達成此目的。You accomplish this by adding the Azure Boards app for Microsoft Teams to your Teams channel.

適用于 Microsoft 團隊的 Azure Boards 應用程式可讓使用者執行下列工作:The Azure Boards app for Microsoft Teams enables users to perform the following tasks:

  • 設定和管理用來建立和更新工作專案的訂閱Set up and manage subscriptions for creating and updating work items
  • 管理其他工作專案事件Manage other work item events
  • 接收和管理小組頻道中工作專案事件的通知Receive and manage notifications for work item events in their Teams channel
  • 從通道中的交談建立工作專案Create work items from conversations in the channel
  • 使用訊息延伸模組在通道中搜尋和共用工作專案與其他成員Search and share work items with other members in the channel using the messaging extension
  • 從其 Url 查看工作專案預覽,以起始討論並保持交談的內容。View work item previews from their URLs to initiate discussions and keep the conversations contextual.

Pic:通知

請閱讀本文,以瞭解如何:Read this article to learn how to:

  • 將 Azure Boards 應用程式新增至 Microsoft 小組中的小組Add the Azure Boards app to your team in Microsoft Teams
  • 連結 Azure Boards 專案並取消連結至 Azure Boards 應用程式Link and unlink your Azure Boards project to the Azure Boards app
  • 在小組頻道中設定工作專案相關事件的訂閱Set up subscriptions to work item related events in your Teams channel
  • 從小組頻道建立工作專案Create work items from your Teams channel
  • 監視小組頻道中的工作專案活動Monitor work item activity in your Teams channel

必要條件Prerequisites

注意

  • 您現在可以將 Microsoft 小組的 Azure Boards 應用程式連結到目前裝載于 Azure DevOps Services 的專案。You can link the Azure Boards app for Microsoft Teams only to a project hosted on Azure DevOps Services at this time.
  • 直接訊息內目前不支援通知。Notifications are currently not supported inside direct messages.

將 Azure Boards 應用程式新增至 Microsoft 小組Add the Azure Boards app to Microsoft Teams

您可以將應用程式新增至 Microsoft 小組的小組頻道。You add the app to your Teams channel in Microsoft Teams.

  1. 造訪 Microsoft 團隊的 App store,並搜尋 Azure Boards 應用程式。Visit the App store in Microsoft Teams and search for the Azure Boards app. 安裝時,應用程式中的歡迎訊息會顯示如下圖所示。Upon installing, a welcome message from the app displays as shown in the following image.

    Pic:歡迎訊息

  2. 使用 @azure boards 控制碼來與應用程式互動。Use the @azure boards handle to interact with the app. 如需命令清單,請參閱本文稍後提供的 命令參考For a list of commands, see Command reference provided later in this article.

若要使用應用程式,您必須先將 Azure Boards 專案連結至您的小組頻道。To use the app, you must first link your Azure Boards project to your Teams channel.

  1. 在您的小組中安裝應用程式之後,請將您自己連接並驗證 Azure Boards。Once the app has been installed in your team, connect and authenticate yourself to Azure Boards. 如果您的 Microsoft 小組和 Azure Boards 位於不同的租使用者中,請使用 不同的電子郵件登入Use Sign in with different email if your Microsoft Teams and Azure Boards are in different tenants.

    將您自己連接並驗證 Azure Boards。

    將您自己連接並驗證 Azure Boards 步驟2。

  2. 登入之後,在小組通道內使用下列命令,以連結至您以 URL 指定的 Azure Boards 專案:After signing in, use the following command inside a Teams channel to link to the Azure Boards project that you specify with the URL:

    @azure boards link [project url]
    

    例如:For example:

    @azure boards link https://dev.azure.com/myorg/myproject
    

連結專案之後,您可以使用 @azure boards create 命令或使用訊息動作來建立工作專案。Once the project is linked, you can create work items using @azure boards create command or use message actions.

設定訂閱Set up subscriptions

您可以使用命令來建立訂閱,以隨時監視工作專案 @azure boards subscriptionsYou can create subscriptions to monitor work items at any time using the @azure boards subscriptions command.

  1. 選取所需的區域路徑和您感興趣的事件。Select the desired area path and event that you are interested in. 使用相關聯的篩選自訂您在小組頻道中收到通知的內容。Use the associated filters to customize what you get notified on in your Teams channel. 為了説明您輕鬆地設定訂閱,您最近存取的區域路徑會顯示在 [區域路徑] 下拉式清單中。To help easily set up subscriptions, your recently accessed area paths are shown in the area path dropdown.

    設定訂閱。

如果所需的區域路徑未出現在 [區域路徑] 下拉式功能表中,請依照下一節中所述的指示, 加入區域路徑In case the desired area path doesn't appear in the Area path dropdown menu, follow the instructions mentioned in the next section, Add area paths. 使用命令和區域路徑(在通道中建立的訂用帳戶)所新增的區域路徑 @azure boards addAreapath 一律會出現在 [區域路徑] 下拉式清單中,以及最近存取的區域路徑。Area paths added using the @azure boards addAreapath command and area paths for which subscriptions are created in the channel always appear in the Area path dropdown along with recently accessed area paths.

新增區域路徑Add area paths

您可以將小組所處理的區域加入至通道,讓它們隨時都可以建立工作專案和訂閱。You can add areas that your team works on to the channel so that they are always available for creating work items and subscriptions. 這項功能適用于其專案中有超過100區域路徑的小組。This feature is useful for teams with more than 100 area paths in their project.

  • 使用下列命令,將專案中的區域路徑新增至小組頻道。Use the following command to add area paths from your project to the Teams channel.

    @azure boards addAreapath [area path] 
    

    例如:For example:

    @azure boards addAreapath myproject\fabrikam
    

    新增 system.areapath 成功訊息

  • 如果您選擇 [專案名稱] 作為區域路徑,則會收到專案中所有區域路徑的通知。If you choose project name as your area path, then you'll receive notifications for all the area paths in the project.

使用命令建立工作專案Create a work item with a command

使用 Azure Boards 應用程式時,您可以從通道建立工作專案。With the Azure Boards app, you can create work items from your channel. 應用程式也支援自訂工作專案。The app supports custom work items as well.

  • 若要建立工作專案,請使用 @azure boards createTo create a work item, use @azure boards create.

    使用命令建立工作專案

從訊息動作建立工作專案Create a work item from message actions

通常,在頻道中的討論需要建立工作專案。Often, discussions in a channel require creation of work items. 您可以使用訊息動作來建立工作專案。You can use message actions to create a work item. 選取的訊息會預先填入工作專案的 [描述] 區段中。The selected message is pre-filled in the description section of the work item. 新加入之工作專案的討論區段會將連結傳回至通道中的交談。The Discussion section of the newly added work item stores a link back to the conversation in the channel.

  • 使用訊息動作建立工作專案To create work items using message actions

    使用訊息動作建立工作專案Create work item using message action

    使用訊息動作的步驟2來建立工作專案。

管理訂用帳戶Manage subscriptions

  1. 若要查看、新增和移除通道的訂閱,請使用 @azure boards subscriptions 下列命令:To view, add and remove subscriptions for a channel, use the @azure boards subscriptions command:

    @azure boards subscriptions
    

此命令會列出通道的所有目前訂用帳戶,並可讓您加入新的訂用帳戶,並移除現有的訂閱。This command lists all the current subscriptions for the channel and allows you to add new subscriptions and remove existing ones. 在新增訂用帳戶的過程中,您也可以使用各種篩選自訂您收到通知的內容。As part of adding subscriptions, you can also customize what you get notified on by using various filters.

檢視訂用帳戶View subscriptions

注意

小組系統管理員無法移除或修改專案系統管理員所建立的訂閱。Team administrators aren't able to remove or modify subscriptions created by Project administrators.

使用撰寫延伸模組來搜尋和共用工作專案Search and share work items using compose extension

為了協助使用者搜尋和共用工作專案,Microsoft 小組的 Azure Boards 應用程式支援撰寫延伸模組。To help users search and share work items, the Azure Boards app for Microsoft Teams supports compose extension. 您可以依工作專案 ID 或標題來搜尋工作專案。You can search for work items by work item ID or by title. 若要讓撰寫延伸模組運作,使用者必須藉由執行 @azure boards signin 命令或直接登入撰寫延伸模組,登入 Azure Boards 應用程式。For compose extension to work, users must sign in to Azure Boards app either by running @azure boards signin command or by signing into the compose extension directly.

登入撰寫延伸模組。

預覽工作專案 UrlPreview work item URLs

為了支援在頻道內討論之工作專案的共同作業,通道會顯示所參考工作專案的預覽。To support collaboration around work items discussed within a channel, the channel displays a preview of work items referenced. 當使用者貼上工作專案 URL 時,會顯示類似下圖的預覽。When a user pastes the work item URL, a preview is shown similar to the following image. 此預覽有助於保持與工作專案相關的交談相關且正確。This preview helps to keep work item-related conversations relevant and accurate.

工作專案 URL unfurling。

若要讓這項功能正常運作,使用者必須登入。For this feature to work, users must be signed in. 登入之後,這項功能適用于 Microsoft 小組小組中的所有頻道。Once signed in, this feature works for all channels in a team in Microsoft Teams.

小組頻道一次只能連結到一個 Azure Boards 專案。A Teams channel can only link to one Azure Boards project at a time. 若要連結至不同的專案,您必須先使用命令取消連結目前的專案 @azure boards unlinkTo link to a different project, you must first unlink the current project using @azure boards unlink command.

取消連結專案會刪除所有的訂閱,以及從通道新增的區域路徑。Unlinking a project deletes all the subscriptions along with added area paths from the channel. 如果通道沒有任何訂閱,則任何使用者都可以取消連結專案。If the channel has no subscriptions, any user can unlink a project. 但是,如果通道有訂用帳戶,則只有 project admins 可以取消專案與通道的連結。However if a channel has subscriptions, only project admins can unlink a project from a channel.

執行緒通知Threaded notifications

小組頻道執行緒會通知,以邏輯方式連結和減少通道中的相關通知。The Teams channel threads notifications so as to logically link and reduce related notifications in the channel. 連結至特定工作專案的所有通知都會連結在一起。All notifications linked to a particular work item are linked together.

執行緒通知的 Compact viewCompact view of threaded notifications

Compact 執行緒Compact thread

展開執行緒通知的視圖Expanded view of threaded notifications

展開的執行緒Expanded thread

命令參考資料Command reference

下表列出 @azure boards 您可以在 Microsoft 小組頻道中使用的所有命令。The following table lists all the @azure boards commands you can use in your Microsoft Teams channel.

命令Command 功能Functionality
@azure 面板連結 [專案 url]@azure boards link [project url] 將專案連結至此通道以建立工作專案並接收通知Link a project to this channel to create work items and receive notifications
@azure 面板訂用帳戶@azure boards subscriptions 新增或移除此通道的訂閱Add or remove subscriptions for this channel
@azure 板建立@azure boards create 建立工作項目Create a work item
@azure 面板 addAreapath [區域路徑]@azure boards addAreapath [area path] 將專案中的區域路徑新增至此通道Add an area path from your project to this channel
@azure 面板登入@azure boards sign in 登入您的 Azure Boards 組織Sign in to your Azure Boards organization
@azure 面板登出@azure boards sign out 登出您的 Azure Boards 組織Sign out from your Azure Boards organization
@azure 面板取消連結@azure boards unlink 取消連結此通道中的專案Unlink a project from this channel
@azure 板意見反應@azure boards feedback 回報問題或建議功能Report a problem or suggest a feature

在 Microsoft 小組中設定 Azure DevOps Services 索引標籤Configure Azure DevOps Services tabs in Microsoft Teams

  1. 若要將您的儀表板或儀表板帶入 Microsoft 小組,請按一下小組頻道上方導覽的 [+] ( [新增索引標籤] ) 按鈕。To bring your Kanban board or Dashboard into Microsoft Teams, click the '+' ('add new tab') button on the top nav of your team channel.

    [ 加入 索引標籤] 對話方塊隨即顯示。The Add a tab dialog displays. 圖示通常會根據最新的存取來排列。Icons are arranged typically according to most recent access. 您可以針對依字母順序排列的清單選取-Z。You can select A-Z for an alphabetized list.

    將新的索引標籤新增至 [小組] 頻道的螢幕擷取畫面。

  2. 選擇 Azure DevOps 圖示,並驗證您的身分識別。Choose the Azure DevOps icon and authenticate your identity. (選擇性)您可以選擇 [ 網站 ] 圖示,並將您的儀表板或儀表板的 URL 新增至頻道。Optionally, you can choose the Website icon and add the URL of your Kanban board or dashboard to the channel.

  3. 選擇您要新增其面板或儀表板的組織。Choose the organization whose board or dashboard you want to add.

  4. 填寫提供的表單。Fill out the form presented. 例如,我們會在此為 TechnicalContent 專案的 Azure DevOps 小組新增儀表板。For example, here we add a dashboard for the Azure DevOps team for the TechnicalContent project.

    將小組儀表板加入至小組頻道的對話方塊。

  5. 您選取的電路板或儀表板隨即顯示。The Kanban board or dashboard you selected displays.

多租用戶支援Multi-tenant support

如果您的組織使用不同的電子郵件或租使用者給 Microsoft 小組和 Azure DevOps,請執行下列步驟來登入,並根據您的使用案例進行連線。In your organization if you are using a different email or tenant for Microsoft Teams and Azure DevOps, perform the following steps to sign in and connect based on your use case.

情況 下 Case Microsoft 小組的電子郵件識別碼和租使用者 Email ID and tenant in Microsoft Teams Azure DevOps 中的電子郵件識別碼和租使用者 Email ID and tenant in Azure DevOps 要採取的步驟 Steps to take
11 email1@abc.com (租使用者 1) email1@abc.com (tenant 1) email1@abc.com (租使用者 1) email1@abc.com (tenant 1) 使用 [登 ] 按鈕登入。Sign in using Sign in button.
22 email1@abc.com (租使用者 1) email1@abc.com (tenant 1) email1@abc.com (租使用者 2) email1@abc.com (tenant 2)
  • 登入 Azure DevOps 帳戶Sign in the Azure DevOps account
  • 在相同的瀏覽器中,開啟新的索引標籤,流覽至 https://teams.microsoft.comIn the same browser, start a new tab, navigate to https://teams.microsoft.com
  • 執行 signin 命令,然後選擇 [登 ] 按鈕。Run the signin command and choose the Sign in button.
33 email1@abc.com (租使用者 1) email1@abc.com (tenant 1) email2@pqr.com (租使用者 2) email2@pqr.com (tenant 2) 使用 不同電子郵件地址登入,在電子郵件識別碼選擇器中使用 email2 登入 Azure DevOps。Sign in using Sign in with different email address, in the email id picker use the email2 to sign in to Azure DevOps.
44 email1@abc.com (租使用者 1) email1@abc.com (tenant 1) email2@pqr.com (非預設租使用者 3) email2@pqr.com (non default tenant 3) 目前不支援此案例This scenario is not supported today

疑難排解Troubleshoot

如果您在使用 Microsoft 小組的 Azure Boards 應用程式時遇到下列錯誤,請遵循本節中的程式。If you are experiencing the following errors when using the Azure Boards App for Microsoft Teams, follow the procedures in this section.

抱歉!發生錯誤。Sorry, something went wrong. 請再試一次。Please try again.

Azure Boards 的應用程式會使用 OAuth 驗證通訊協定,而且需要透過 oauth 進行協力廠商應用程式存取 ,才能啟用組織。The Azure Boards app uses the OAuth authentication protocol, and requires Third-party application access via OAuth for the organization to be enabled. 若要啟用此設定,請流覽至 [組織設定 > 安全 > 策略],並將 [組織] 設定的 協力廠商應用程式存取 設定為 [開啟]。To enable this setting, navigate to Organization Settings > Security > Policies, and set the Third-party application access via OAuth for the organization setting to On.

啟用透過 OAuth 進行組織設定的協力廠商應用程式存取Enable the Third-party application access via OAuth for the organization setting

設定失敗。Configuration failed. 請確認組織 ' {組織名稱} ' 存在,而且您有足夠的許可權。Please make sure that the organization '{organization name}' exists and that you have sufficient permissions.

流覽至 https://aka.ms/VsSignout 使用您的瀏覽器,登出 Azure DevOps。Sign out of Azure DevOps by navigating to https://aka.ms/VsSignout using your browser.

在私用incognito 瀏覽器視窗中開啟,然後流覽 https://aex.dev.azure.com/me 並登入。Open an In private or incognito browser window and navigate to https://aex.dev.azure.com/me and sign in. 在左邊的 [設定檔] 圖示底下的下拉式清單中,選取包含您要連結之專案的組織目錄。In the dropdown under the profile icon to the left, select the directory that contains the organization containing the project that you want to link.

選取包含專案之組織的目錄Select the directory that contains the organization that contains the project

相同的瀏覽器 中,開啟新的索引標籤,流覽至 https://teams.microsoft.com/In the same browser, start a new tab, navigate to https://teams.microsoft.com/. 執行 @azure boards signout 命令,然後 @azure boards signin 在安裝 Microsoft 小組 Azure Boards 應用程式的通道中執行命令。Run the @azure boards signout command and then run the @azure boards signin command in the channel where the Azure Boards app for Microsoft Teams is installed.

選取 Sign in 按鈕,系統會將您重新導向至如下列範例所示的同意頁面。Select the Sign in button and you'll be redirected to a consent page like the one in the following example. 確定電子郵件旁邊顯示的目錄與上一個步驟中所選擇的目錄相同。Ensure that the directory shown beside the email is same as what was chosen in the previous step. 接受並完成登入程式。Accept and complete the sign-in process.

同意要求的應用程式許可權Consent to the requested app permissions

如果這些步驟無法解決您的驗證問題,請在 開發人員社群與我們聯繫。If these steps don't resolve your authentication issue, reach out to us at Developer Community.