Skip to content
master
Switch branches/tags
Code
page_type products languages description urlFragment extensions
sample
office
office-teams
office-365
csharp
javascript
typescript
html
Huddle developer templates built on the Microsoft Teams platform help drive quality and care outcomes by enabling collaboration.
ms-teams-huddle
contentType createdDate
samples
2/22/2018 10:58:13 AM

Huddle

Improving quality of care depends on many things – process, patient care, and research planning. Huddle developer templates built on the Microsoft Teams platform, help drive quality and care outcomes by enabling collaboration with more effective huddle teams. With the huddle sample solutions, you can:

  • Measure and visualize impactful best practices across your organization.
  • Identify patient care issues and potential causes.
  • Share ideas with your health team using natural conversations.

Table of content

Foreword

Enable and Create Microsoft Teams

Import and publish LUIS App

Create SharePoint Site and Lists

Create App Registrations in AAD

Deploy Azure Components with ARM Template

Follow-up Steps

Configure Teams App

Foreword

This document will guide you to deploy the solution to your environment.

First, an Azure AAD is required to register the app registrations. In this document, the Azure AAD will be called "Huddle AAD", and an account in Huddle AAD will be called Huddle work account.

  • All app registrations should be created in the Huddle AAD.

  • Bot/Luis/Microsoft App should be registered with a Huddle work account. This account should have permission to deploy resource and create resource group in Azure.

  • SharePoint lists should be created on SharePoint associating with Huddle AAD.

  • Following Powershell Modules are installed

    Notes:

    Run PowerShell as Administrator, and execute the commands below to install required modules:

    Install-Module MicrosoftTeams
    Install-Module ImportExcel
    Install-module Microsoft.Graph
    Install-Module SharePointPnPPowerShellOnline
    Install-Module Az
  • Required NodeJS on your local environment. Node.js >= 8.5 and npm installed on your machine, then use:

npm install -g luis-apis

An Azure Subscription is required to deploy the Azure components. We will use the ARM Template to deploy these Azure components automatically.

Please download files in /Files folder to your computer.

To learn more about the huddle solutions in Microsoft Teams and Microsoft O365, visit the Microsoft developer blog.

Enable and Create Microsoft Teams

Enable Microsoft Teams feature

Please follow Teams org-wide settings in the Microsoft Teams admin center.

Make sure the following options are turned on:

  • Allow third-party apps

  • Allow interaction with custom apps

Create Teams

In this section, we will connect to Microsoft Teams in PowerShell with a Huddle AAD account, and execute some PowerShell scripts to create teams from an Excel file.

Note: after you finish this section, teams will be created right away. But their owners and members will take up to an hour to show in Teams. Refer to Add-TeamUser for more details.

  1. First, let open and edit /Files/Teams.xlsx. Input the teams and related information.

    Note:

    • AccessType:
      • Private: Private teams can only be joined if the team owner adds you to them. They also won't show up in your teams gallery.
      • Public: public teams are visible to everyone from the teams gallery and you can join them without getting approval from the team owner.
    • Owners and Members:
      • Please use UPN (User Principle Name) instead of email.
      • Use ";" to separate multi-users.
      • The Huddle work account used to connect to Microsoft Teams will be added as the owner of each team automatically, no matter it is in the owners column or not.
  2. Open PowerShell Console

  3. Navigate to the /Files folder in PowerShell

    cd <Path to Files folder> # For example: cd "c:\Users\Admin\Desktop\Huddle\Files\"
  4. Connect to Microsoft Teams with a Huddle AAD account.

    Connect-MicrosoftTeams
    
  5. Execute the commands below which reads data from the Excel file and create teams:

    .\NewTeams.ps1 -excelPath .\Teams.xlsx

Update Each Team

For each team you created, please active the default planer and create 4 buckets:

  1. Open https://www.office.com, sign in.

    Click Planner.

    Click New plan and then click Add to an existing Office 365 Group. Create a plan with the same name in the previously created group.

  2. Create the following buckets:

    • New Idea
    • In Progress
    • Completed
    • Shareable

Import and publish LUIS App

  1. Open PowerShell Console and navigate to the /Files folder in PowerShell

  2. Connect to Microsoft Azure with a Huddle work account.

    Connect-AzAccount
  3. Run the following script in the PowerShell console. This script will create a resource group in Azure, then import, train, and publish LUIS App. Replace <resource group name> with the resource group name you expect. If the execution is successful, LUIS App Id and ResourceGroup Suffix will be returned. Remember these two values

    #Replace <resource group name> with the resource group name you expect.
    .\DeployLuis.ps1 -appPath .\LUISApp.json -resourceTemplate .\LUISTemplate.json -resourceGroup <resource group name>

Create SharePoint Site and Lists

Create a site collection

  1. Open a web browser and go to SharePoint Administration Center.

    https://<YourTenant>-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx

  2. Click New -> Private Site Collection.

  3. Fill in the form:

    • In the Title field, enter site title.
    • In the Web Site Address field, enter hospital site URL.
    • Select a language: English
    • In the Template Selection section, select Team Site as site template.
    • Choose a Time Zone.
    • Administrator should be the alias of the individual you want to have full administrator rights on this site.
    • Leave Server Resource Quota at 300. (This value can be adjusted later if needed)
  4. Click OK.

  5. When the site is created, use Huddle AAD account to log in to the site just created.

  6. Click the gear in the upper right corner of the page, Shared with..., Invite people. Add the users you want to use. And click Save

  7. Copy aside the URL of the site collection. It will be used as the value of Base SP Site Url parameter of the ARM Template.

Provision Lists

  1. Install SharePointPnPPowerShellOnline module, if you have not installed it.

    Please follow: https://msdn.microsoft.com/en-us/pnp_powershell/pnp-powershell-overview#installation

  2. Open Power Shell, then execute the command below to connect to the site you just created:

    Connect-PnPOnline -Url https://<Tenant>.sharepoint.com/sites/<Site> -Credentials (Get-Credential)

    Note: Please replace <Tenant> and <Site>.

  3. Login in with an admin account.

  4. Navigate to /Files folder in PowerShell, then execute the following command:

    Apply-PnPProvisioningTemplate -Path PnPProvisioningTemplate.xml

    Notes: The Following sample data was created in the Categories list

    • Safety/Quality
    • Access
    • Experience
    • Finance
    • People

Create App Registrations in AAD

Register App in AAD

  1. Open PowerShell Console and navigate to the /Files folder in PowerShell

  2. Connect to Microsoft Azure with a Huddle AAD account.

    Connect-Graph -Scopes Directory.AccessAsUser.All
  3. Run the following script in the PowerShell console. This script will create the following 4 Applications in AAD. The names of these 4 Applications are defined at the top of NewApps.ps1.

    • Huddle Bot
    • Huddle Bot Web App
    • Huddle Metric Web App
    • Huddle MS Graph Connector App
    .\NewApps.ps1 -ResourceGroupSuffix <your resourceGroupSuffix value>

    Notes: The resourceGroupSuffix value is generated in Import and publish LUIS App section

  4. After the script runs successfully, it will return the following data, remember these data

    • Tenant Id
    • Microsoft App Id
    • Microsoft App Password
    • Bot Client Id
    • Bot Client Secret
    • Metric Client Id
    • Metric Client Secret
    • Graph Client Id
    • Graph Client Secret
    • Certificate Pfx Base64
    • Certificate Pfx Password

Consent Permissions

  1. Log in to Azure Portal with Huddle AAD account.

  2. Find Huddle Bot Web App just created in App registrations.

  3. In API Permission tab, consent the permission

  4. Follow step 2 and step 3, consent the permission for Huddle Metric Web App and Huddle MS Graph Connector App

Deploy Azure Components with ARM Template

GitHub Authorize

  1. Generate Token

    • Open https://github.com/settings/tokens in your web browser.

    • Sign into your GitHub account where you forked this repository.

    • Click Generate new token.

    • Enter a value in the Token description text box.

    • Select the following s (your selections should match the screenshot below):

      • repo (all) -> repo:status, repo_deployment, public_repo, repo:invite, security_events
      • admin:repo_hook -> read:repo_hook

    • Click Generate token.

    • Copy the token.

  2. Add the GitHub Token to Azure in the Azure Resource Explorer

Deploy Azure Components

  1. Fork this repository to your GitHub account.

  2. Click the Deploy to Azure Button:

    Deploy to Azure

  3. Fill in the values on the deployment page:

    You have collected most of the values in previous steps. For the rest parameters:

    • Resource group: select to created resource group in previous step.
    • Bot Name: the name of the bot, will be used as Display Name of Bot Registration.
    • Global Team: the name of the global team that is one of the Teams created earlier. A webjob will move shared tasks in other team planners to the shared bucket of Global Team
    • Source Code Repository: use the URL of the repository you just created -https://github.com/<YourAccount>/Office-365-Huddle-Templates
    • Source Code Branch: master
    • Source code Manual Integration: false
    • Check I agree to the terms and conditions stated above.

    Tips:

    You can click Edit Parameters on top of the template after filled all parameters.

    Then click Download to save parameters on your local computer in case of deployment failure.

  4. Click Purchase.

Handle Errors

If the deployment started, but failed as below - one or two errors of sourcecontrols resources:

Please Redeploy with the same parameters and to the same resource group.

Follow-up Steps

Customize and Configure the Bot

  1. On Azure Portal, find the Resource Group you just created. Navigate to the Bot Channels Registration you created.

  2. Upload an icon:

    • Click Settings.

    • Upload /Files/HuddleBotIcon.png as the Icon.

    • Click Save.

Authorize Planner API Connection

  1. Navigate to planner in the resource group you just created.

  2. Click the planner API Connection.

  3. Click Edit API connection.

  4. Click Authorize.

    Pick up or input the Huddle AAD account. The user account should be in every team.

    Sign in the account.

  5. Click Save at the bottom.

Authorize Teams API Connection

Follow the similar steps in the previous chapter to authorize the teams API Connection.

Authorize Microsoft Graph API Connection

Follow the similar steps in the previous chapter to authorize the microsoft-graph API.

Add Prediction Resource in LUIS App

  1. Open LUIS site and log in with Huddle work account

  1. Navigate to My apps tab

  2. Select the Subscription and Resource deployed in the previous step (the suffix of this resource has the same suffix as the luis app deployed in the previous step)

  1. Click on the listed app

  2. Select MANAGE tab on the top

  1. Select Azure Resources tab on the left

  1. Click Add prediction resource button

  1. Select the Subscription and Resource deployed in the previous step (the suffix of this resource has the same suffix as the luis app deployed in the previous step)

  1. Click Done button to save changes.

Configure Teams App

Create Teams App Package and Side-load It

  1. Open /Files/TeamsAppPackage/manifest.json with a text editor.

  2. Replace the following 2 placeholders with the corresponding values you got in previous guides:

    • <MicrosoftAppId>: Microsoft App Id generated in previous step.

    • <MetricWebAppDomain>: the domain of the Metric Web App

  3. Save the changes.

  4. Zip the files in /Files/TeamsAppPackage folder.

    Name it HuddleTeamsApp.zip.

  5. Right-click a team in Microsoft Teams, then click Manage team.

  6. Click the Apps tab.

  7. Then click Upload a custom app.

  8. Select the HuddleTeamsApp.zip.

  9. Click Add button.

Add Metric Input Tab

  1. Click a team.

  2. Click +

  3. Click Huddle App.

  4. Click Save.

Add Idea Board Tab

  1. Click a team.

  2. Click +

  3. Click Planner.

  4. Choose Use an existing plan, then select the plan which has the same name as the team.

  5. Click Save.

  6. Click the dropdown icon, then click Rename.

    Input: Idea Board

  7. Click Save.

Start Conversation with The Bot

Follow the step below to start 1:1 conversation with the Bot in Microsoft Teams

  1. Find the URL of Microsoft Teams Channel of the Bot,

    Then open it in your browser:

  2. Click Open Microsoft Teams.

Another way to start 1:1 talk is using the MicrosoftAppId of the Bot:

Copyright (c) 2018 Microsoft. All rights reserved.

About

Accelerator for showing Office 365 Services and Apps in lean, process-improvement scenario

Resources

License

Packages

No packages published