編輯

共用方式為


Tools and SDKs

Build and develop your Microsoft Teams app using tools, SDKs, and libraries. Now, Microsoft provides a comprehensive platform to create, develop, test, debug, and publish your Teams app seamlessly, making the entire process efficient and streamlined. Teams offers the following platform:

Tools

Teams platform brings you different tools to build and develop your Teams apps. The following tools are available to build your app:

Tools Why do you need? Environment Test and debug
Teams Toolkit Teams Toolkit makes it simple to get started with app development for Teams. You can begin with a project template for common custom app built for your org (LOB app) scenarios or start from a sample. Save time on setup through automated app registration and configuration using Visual Studio Code and Visual Studio. Visual Studio Code: JavaScript and TypeScript
Visual Studio: .NET and Blazor
In Visual Studio Code and Visual Studio
Yeoman generator for Teams Yeoman generator or YoTeams allows you to create Teams apps using TypeScript and JavaScript on your terms, in your preferred editor, and without any external or online dependencies. TypeScript and JavaScript NA
Teams Toolkit CLI TeamsFx CLI is a text-based command line interface (CLI) that accelerates Teams application development. It aims to provide keyboard centric experience when building Teams applications. JavaScript and .NET Use command prompt
Developer Portal for Teams Developer Portal for Teams is the primary tool for configuring, distributing, and managing your Teams apps. With Developer Portal, you can create a basic app manifest (previously known as Teams app manifest) and distribute the app to Teams. Supports all languages Developer Portal for Teams

More information on building Teams app with Teams Toolkit and Yeoman Teams Project.
  Teams Toolkit Yeoman Teams project
Environment variables Use .env file Use .env file
Generate manifest Teams Toolkit autogenerates when creating projects. gulp manifest
Deploy Teams app Automatically update use command Teams: Update Teams App gulp tenant: deploy
Create Microsoft Entra app Automatically create when debugging or provisioning the project. Users can also use their existing Microsoft Entra app by filling in Teams app ID in .env file. Manual
Add SSO Provide SSO-enabled samples and how-to guides to add SSO. Manual
Bot or Message extension Registration Automatically create when debugging or provisioning the project. User can also specify their own Bot ID. Manual (Azure Bot)
Expose Node.js app Tab: localhost + HTTPS and Others: Dev Tunnel gulp ngrok-serve
Run Node.js app npm run teamsfx:dev gulp serve
One-click debug F5 or debug in Visual Studio Code and Visual Studio N/A

SDKs and libraries

Teams Platform brings you different SDKs, libraries, and APIs to build and develop your Teams apps.

The following flow diagram explains the different SDKs, libraries, and its relations:

Screenshot shows you the list of all tools and SDKs that are available for you to build Teams apps.

Library that requires another library to build apps. Your project automatically pulls into another library.
Library that passes your app a reference to another library.
Library often used with another library, but there's no formal dependency.
Library that's underlying service or API.

Teams Developer Platform SDKs & libraries

SDKs and libraries Why do you need? Related SDKs and libraries
TeamsFx SDK TeamsFx simplifies your tasks by using Teams single sign-on (SSO) and accessing cloud resources into single-line statements with zero configuration. Depends on Bot Framework SDK, Teams JavaScript client library, and Microsoft Graph SDK.
You can use it with Teams AI Library and Adaptive Cards.
Teams JavaScript client library The Teams JavaScript client library (TeamsJS) enables you to create hosted experiences within Teams, Microsoft 365 app, and Outlook. These experiences involve hosting your app content in an iFrame. You can pass the reference to SharePoint Framework (SPFx).
You can use it with Microsoft Graph SDK, Adaptive Cards, and Fluent UI React components.
SharePoint Framework (SPFx) The SharePoint Framework (SPFx) offers a page and web part model that fully supports client-side SharePoint development, seamlessly integrates with SharePoint data, and extends Microsoft Teams and Microsoft Viva. You can use it with Microsoft Graph SDK, Adaptive Cards, and Fluent UI React components.
Based on SharePoint REST API.
Live Share SDK Live Share is an SDK created to turn Teams apps into collaborative multi-user experiences without requiring dedicated back-end code to be written. You can use it with Microsoft Graph SDK, Adaptive Cards, and Fluent UI React components.
You can pass the reference to Teams JavaScript client library.

Core SDKs and libraries to build Teams app

SDKs and libraries Why do you need? Related SDKs and libraries
Bot Framework SDK Microsoft Bot Framework and Azure AI Bot Service are a collection of libraries, tools, and services that enable you to build, test, deploy, and manage intelligent bots. The Bot Framework includes a modular and extensible SDK for building bots and connecting to AI services. Based on Azure Bot Service.
Microsoft Graph SDKs The Microsoft Graph SDKs are designed to simplify the creation of high-quality, efficient, and resilient applications that access Microsoft Graph. The SDKs include two components such as service library and core library. Based on Microsoft Graph.
Teams AI library Teams AI library is a Teams-centric interface to GPT-based common language models and user intent engines. This reduces the requirement for you to handle on complex and expensive tasks of writing and maintaining conversational bot logic to integrate with Large Language Models (LLMs). Depends on Bot Framework SDK.
Based on Azure OpenAI.

Additional libraries and UI utilities to build Teams apps

SDKs and libraries Why do you need? Related SDKs and libraries
Adaptive cards An Adaptive Card is a customizable card that can contain any combination of text, speech, images, buttons, and input fields. You can use it with TeamsFx SDK, Teams JavaScript client library, and SharePoint Framework (SPFx).
Fluent UI React components Fluent UI React components are a collection of UI elements and tools that come from combining various React-based component libraries used in production, like @fluentui/react and @fluentui/react-northstar. You can use it with Teams JavaScript client library and SharePoint Framework (SPFx).
Fluid Framework Fluid Framework consists of client libraries that help distribute and synchronize shared state. These libraries enable multiple clients to simultaneously create and operate on shared data structures using coding patterns similar to those used to work with local data. You can pass the reference to Live Share SDK.
Based on Azure Fluid Relay.

Microsoft Entra ID-secured services and APIs

SDKs and libraries Why do you need? Related SDKs and libraries
Azure Bot Services Azure Bot Service is a collection of libraries, tools, and services that let you build, test, deploy, and manage intelligent bots. Used for Bot Framework SDK.
Azure OpenAI Azure OpenAI Service provides REST API access to OpenAI's powerful language models including the GPT-3, Codex, and Embeddings model series. Besides, the new GPT-4 and ChatGPT (gpt-35-turbo) model series are now available in preview. These models can be adapted to your specific task including but not limited to content generation, summarization, semantic search, and natural language to code translation. Used for Teams AI Library.
Microsoft Graph Microsoft Graph is the gateway to data and intelligence in Microsoft 365. It provides a unified programmability model that you can use to access the tremendous amount of data in Microsoft 365, Windows, and Enterprise Mobility + Security. Use the wealth of data in Microsoft Graph to build apps for organizations and consumers that interact with millions of users. Used for Microsoft Graph SDK.
SharePoint REST API You can remotely engage with SharePoint data using any technology that supports Representational State Transfer (REST) web requests. You can perform basic create, read, update, and delete (CRUD) operations by using the REST interface provided by SharePoint. Used for SharePoint Framework (SPFx).
Azure Fluid Relay The Fluid Framework is an open source, platform independent framework. Azure Fluid Relay is a managed service for the Fluid Framework that helps developers build real-time collaborative experiences and replicate states across connected JavaScript clients in real-time. Used for Fluid Framework.

Recommendations

Tool Details
Teams Toolkit We recommend using Teams Toolkit v5 to build your apps, as Teams Toolkit v4 is available only with limited functionality.
Teams Toolkit CLI We recommend that you use Teams Toolkit CLI v3 to build your Teams app, as TeamsFx CLI v1 and TeamsFx CLI v2 are available only with limited functionality.