Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
page_type description products languages extensions urlFragment
sample
This Microsoft Teams sample app demonstrates how to use the Live Share SDK to implement a side panel that allows for real-time data sharing during meetings.
office-teams
office
office-365
csharp
contentType createdDate
samples
07/07/2021 01:38:27 PM
officedev-microsoft-teams-samples-meetings-sidepanel-csharp

Meetings SidePanel

This sample application demonstrates the implementation of a Side Panel in Microsoft Teams meetings, leveraging the Live Share SDK for real-time data sharing. Users can add agenda items, publish them to the meeting chat, and interact with the app through adaptive cards and customizable themes, enhancing the overall meeting experience.

Included Features

  • Meeting Stage
  • Meeting SidePanel
  • Live Share SDK
  • Adaptive Cards
  • RSC Permissions
  • App Theme

Interaction with app

Customform

Interaction with app theme

Preview Image

Prerequisites

Run the app (Using Teams Toolkit for Visual Studio)

The simplest way to run this sample in Teams is to use Teams Toolkit for Visual Studio.

  1. Install Visual Studio 2022 Version 17.10 Preview 4 or higher Visual Studio
  2. Install Teams Toolkit for Visual Studio Teams Toolkit extension
  3. In the debug dropdown menu of Visual Studio, select Dev Tunnels > Create A Tunnel (set authentication type to Public) or select an existing public dev tunnel.
  4. In the debug dropdown menu of Visual Studio, select default startup project > Microsoft Teams (browser)
  5. In Visual Studio, right-click your TeamsApp project and Select Teams Toolkit > Prepare Teams App Dependencies
  6. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps.
  7. Select Debug > Start Debugging or F5 to run the menu in Visual Studio.
  8. In the browser that launches, select the Add button to install the app to Teams.

If you do not have permission to upload custom apps (sideloading), Teams Toolkit will recommend creating and using a Microsoft 365 Developer Program account - a free program to get your own dev environment sandbox that includes Teams.

Manually Setup and use the sample locally.

  1. Run ngrok - point to port 5130

    ngrok http 5130 --host-header="localhost:5130"

    Alternatively, you can also use the dev tunnels. Please follow Create and host a dev tunnel and host the tunnel with anonymous user access command as shown below:

    devtunnel host -p 5130 --allow-anonymous
  1. Create Microsoft Entra ID app registration in Azure portal and also register a bot with Azure Bot Service, following the instructions here.

    • Ensure that you've enabled the Teams Channel
    • While registering the bot, use https://<your_tunnel_domain>/api/messages as the messaging endpoint.

      NOTE: When you create your bot you will create an App ID and App password - make sure you keep these for later.

  2. Clone the repository

    git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
  3. If you are using Visual Studio

  • Launch Visual Studio
  • File -> Open -> Project/Solution
  • Navigate to samples\meetings-sidepanel\csharp folder
  • Select SidePanel.sln file and open the solution

Note : In the debug dropdown menu of Visual Studio, select default startup project > SidePanel

  1. Setup and run the bot from Visual Studio: Modify the appsettings.json and fill in the following details:

    • <<MicrosoftAppId>> - Generated from Step 2 (Application (client) ID) is the application app id
    • <<MicrosoftAppPassword>> - Generated from Step 2, also referred to as Client secret
    • <<BaseUrl>> - Your application's base url. E.g. https://12345.ngrok-free.app if you are using ngrok and if you are using dev tunnels, your URL will be like: https://12345.devtunnels.ms.
  2. Modify the manifest.json in the /appPackage folder and replace the following details:

    • <> with any random GUID or your MicrosoftAppId from Microsoft Entra ID app registration.
    • <<YOUR-MICROSOFT-APP-ID>> with Application id generated from Step 2
    • {{Base_URL}} with base Url domain. E.g. if you are using ngrok it would be https://1234.ngrok-free.app then your domain-name will be 1234.ngrok-free.app and if you are using dev tunnels then your domain will be like: 12345.devtunnels.ms.
    • {{domain-name}} with base Url domain. E.g. if you are using ngrok it would be https://1234.ngrok-free.app then your domain-name will be 1234.ngrok-free.app and if you are using dev tunnels then your domain will be like: 12345.devtunnels.ms.
  3. Run your app, either from Visual Studio with F5 or using dotnet run in the appropriate folder.

  4. Navigate to samples\meetings-sidepanel\csharp\ClientApp folder and execute the below command.

    npm install
    npm start
  5. Upload the manifest.zip to Teams (in the Apps view click "Upload a custom app")

    • Go to Microsoft Teams. From the lower left corner, select Apps
    • From the lower left corner, choose Upload a custom App
    • Go to your project directory, the ./appPackage folder, select the zip folder, and choose Open.

Note: If you are facing any issue in your app, please uncomment this line and put your debugger for local debug.

Running the sample

User interactions(Meeting Organizer)

  • Add New Agenda Item - Gives provision to add new Agenda point.
  • Add - Adds the agenda from Textinput to the SidePanel agenda list.
  • Publish Agenda - Sends the agenda list to the meeting chat.

Installation and setup meetings sidepanel.

Install

Install

Install

  1. Welcome image to added side panel. Customform

  2. Screen ready to added the agenda. AddNewAgenda

  3. On click of "Add" button, agenda point will be added to the agenda list. AgendaSubmit

  4. On click of "Publish Agenda", the agenda list will be sent to the meeting chat. AgendaCard

Interaction with app theme when Teams theme changes.

Preview Image

Preview Image

Preview Image

Deploy the bot to Azure

  • To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.

Further reading