| page_type | sample | ||||
|---|---|---|---|---|---|
| description | Sample channel and group tab hello world app. | ||||
| products |
|
||||
| languages |
|
||||
| extensions |
|
||||
| urlFragment | officedev-microsoft-teams-samples-tab-channel-group-quickstart-js |
Tabs are Teams-aware webpages embedded in Microsoft Teams. A channel/group tab delivers content to channels and group chats, and are a great way to create collaborative spaces around dedicated web-based content.
- Microsoft Teams is installed and you have an account (not a guest account)
- To test locally, NodeJS must be installed on your development machine (version 16.14.2 or higher)
- ngrok or equivalent tunneling solution
- M365 developer account or access to a Teams account with the
-
Register a new application in the Azure Active Directory – App Registrations portal. NOTE: When you create app registration, you will create an App ID and App password - make sure you keep these for later.
-
Setup NGROK
-
Run ngrok - point to port 3978
ngrok http -host-header=rewrite 3978
- Setup for code
-
Clone the repository
git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
-
In a terminal, navigate to
samples/tab-channel-group-quickstart/js -
Install modules
npm install
-
Run your app
npm start
- Setup Manifest for Teams
- This step is specific to Teams.
- Edit the
manifest.jsoncontained in theappPackage/folder to replace with your MicrosoftAppId (that was created in step1.1 and is the same value of MicrosoftAppId in.envfile) everywhere you see the place holder string{MicrosoftAppId}(depending on the scenario the Microsoft App Id may occur multiple times in themanifest.json) - Edit the
manifest.jsonforvalidDomainsand replace{{domain-name}}with base Url of your domain. E.g. if you are using ngrok it would behttps://1234.ngrok.iothen your domain-name will be1234.ngrok.io. - Zip up the contents of the
appPackage/folder to create amanifest.zip - Upload the
manifest.zipto Teams (in the left-bottom Apps view, click "Upload a custom app")```
- Edit the
Start debugging the project by hitting the F5 key or click the debug icon in Visual Studio Code and click the Start Debugging green arrow button.
On the first time running and debugging your app you need allow the localhost certificate. After starting debugging when Chrome is launched and you have installed your app it will fail to load.
- Open a new tab
in the same browser window that was opened - Navigate to
https://localhost:3000/tab - Click the
Advancedbutton - Select the
Continue to localhost
Ensure you have the Debugger for Chrome/Edge extension installed for Visual Studio Code from the marketplace.
npm run build
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.



