- Published on
Hello World Tab in Microsoft Teams using yo Teams
This article explains how to create a Hello World Tab in Microsoft Teams using the yo Teams generator.
The Yeoman Teams generator simplifies the setup process for creating custom Teams apps that include tabs, bots, and connectors.
π§± Prerequisites
Make sure the following tools are installed on your machine:
- Node.js (LTS version recommended)
- Gulp CLI
- Yeoman
- Visual Studio Code
- Microsoft 365 Developer Account
Install dependencies globally:
npm install -g yo gulp-cli generator-teams
π Implement Single Sign-On (SSO)
To enable SSO for Teams tabs, first register your app in Azure Active Directory.
Register an App in Azure AD
- Go to the Azure Portal β Azure Active Directory β App Registrations β New Registration.
- Provide an app name, select Accounts in any organizational directory, and click Register.
After registration, note the Application (Client) ID β it will be used later.
Prepare Redirect URI
Add a redirect URI under Authentication:
https://localhost:3007/auth-end
This URL allows local testing with the Teams tab authentication flow.
Configure API Permissions
In the API Permissions tab, click Add a Permission β Microsoft Graph β Delegated Permissions and select:
emailoffline_accessopenidprofileUser.Read
Save and grant admin consent.
βοΈ Create a New Teams Project
Run the Yeoman command to create a new Teams app project:
yo teams
When prompted:
- Enter your project name (e.g.,
teams-yo-helloworld) - Choose Tab as the project type
- Select React as the framework
- Enable Single-Sign-On support (optional)
π» Run the App Locally
Build and run the app using:
gulp build
gulp serve
Your local server will be available at:
https://localhost:3007/
When prompted by Teams, load the appβs manifest file (manifest/manifest.json) to sideload it into your Teams environment.
π§© Add and Test in Microsoft Teams
- Open Microsoft Teams β Apps β Upload a custom app.
- Select your app package (
.zipfile) generated in the/packagefolder. - Add it to a Team or Chat to view your Hello World tab.
You should now see a simple tab interface that displays a "This is your tab" message.
π GitHub Sample Project
View full SPFx project on GitHub:Hello World Tab in Microsoft Teams using yo Teams
β Summary
The yo Teams generator provides a quick way to scaffold Microsoft Teams apps with React and TypeScript support.
By adding Azure AD authentication, you can extend your app to include secure user data and SSO-based experiences.
Author
Ravichandran@Hi_Ravichandran
