page_type | description | products | languages | extensions | contentType | createdDate | |||||
---|---|---|---|---|---|---|---|---|---|---|---|
sample |
Sample channel and group tab with SSO hello world app. |
|
|
samples |
07-07-2021 13:38:27 |
Tabs are Teams-aware webpages embedded in Microsoft Teams. Personal tabs are scoped to a single user. They can be pinned to the left navigation bar for easy access.
-
M365 developer account or access to a Teams account with the appropriate permissions to install an app.
-
Create an Azure AD App registration to support SSO and the User.Read Graph API
Teams needs to access your tab from a publically accessible URL. If you are running your app in localhost, you will need to use a tunneling service like ngrok. Run ngrok and point it to localhost.
ngrok http https://localhost:3000
Note: It may be worth purchasing a basic subscription to ngrok so you can get a fixed subdomain ( see the --subdomain ngrok parameter)
IMPORTANT: If you don't have a paid subscription to ngrok, you will need to update your Azure AD app registration application ID URI and redirect URL ( See steps 5 and 13 here ) everytime you restart ngrok.
In the root directory, execute:
npm install
npm start
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
Advanced
button - Select the
Continue to localhost
Ensure you have the Debugger for Chrome/Edge extension installed for Visual Studio Code from the marketplace.