Edit

Share via

Build your first app with SPFx

Prerequisites

Here's a list of tools you need for building and deploying your apps.

  Install For using...
Required    
  Visual Studio Code JavaScript or TypeScript, build environments. Use latest version.
  Teams Toolkit A Microsoft Visual Studio Code extension that creates a project scaffolding for your app. Use Teams Toolkit v5.
  Node.js Back-end JavaScript runtime environment. For more information, see Node.js version compatibility table for project type.
  Microsoft Edge (recommended) or Google Chrome A browser with developer tools.
Optional    
  Microsoft Graph Explorer Microsoft Graph Explorer, a browser-based tool that lets you run a query from Microsoft Graph data.
  Developer Portal for Teams Web-based portal to configure, manage, and publish your Teams app including to your organization or the Microsoft Teams Store.

Tip

If you work with Microsoft Graph data, you should learn about and bookmark the Microsoft Graph Explorer. This browser-based tool allows you to query Microsoft Graph outside of an app.

Prepare development environment

After you install the required tools, set up the development environment.

Install Teams Toolkit

Microsoft Teams Toolkit helps simplify the development process with tools to provision and deploy cloud resources for your app and publish to the Teams Store.

You can use Teams Toolkit with Visual Studio Code or a command-line interface called TeamsFx CLI.

  1. Open Visual Studio Code and select Extensions (Ctrl+Shift+X or View > Extensions).

  2. In the search box, enter Teams Toolkit.

  3. Select Install.

    Screenshot shows the Teams Toolkit extension installation.

    The Teams Toolkit icon appears in the Visual Studio Code Activity Bar.

You can also install Teams Toolkit from the Visual Studio Code Marketplace.

Set up your Teams development tenant

A tenant is a space or a container for your organization in Teams, where you chat, share files, and run meetings. This space is also where you upload and test your app. Let's verify if you're ready to develop with the tenant.

Check for upload an app option

After creating your custom app, you must upload your app to Teams with the Upload a custom app option. Sign in to your Microsoft 365 account to check if this option is enabled.

The following steps help you verify if you can upload apps in Teams:

  1. In the Teams client, select the Apps icon.

  2. Select Manage your apps.

  3. Select Upload an app.

  4. Look for the option to Upload a custom app. If the option is visible, you can upload custom apps.

    Screenshot shows the option to upload a custom app in Teams.

    Note

    If you don't find the option to upload a custom app, contact your Teams administrator.

Create a free Teams developer tenant (optional)

If you don't have a Teams developer account, join the Microsoft 365 developer program.

  1. Go to the Microsoft 365 developer program.

  2. Select Join Now and follow the onscreen instructions.

  3. In the welcome screen, select Set up E5 subscription.

  4. Set up your administrator account. After you finish, the following screen appears:

    Screenshot shows the Microsoft 365 Developer Program.

  5. Sign in to Teams using the administrator account you just set up. Verify that you have the Upload a custom app option in Teams.

SharePoint Collection Site Administrator account

Ensure that you have an Administrator account for a SharePoint Site Collection. You need this account at deployment for hosting. If you're using a Microsoft 365 developer program tenant, you can use the administrator account you created at the time.

Now you’ve got all tools and set up your account. Next, let's set up your development environment and start building!