編輯

共用方式為


Add cloud resources and API connection

Microsoft Teams Toolkit enables you to provision cloud resources for hosting your app, tailored to your development needs. By adding more cloud resources in TeamsFx, you can autogenerate all configuration files and seamlessly connect to the Microsoft Teams app using Teams Toolkit. Additionally, Teams Toolkit allows you to access and use existing APIs, whether developed by your organization or a third party, for building Teams apps.

Note

If you've created SharePoint Framework (SPFx) based tab project, you can't add Azure cloud resources.

Add cloud resources

You can add cloud resources in the following ways:

To add cloud resources using Teams Toolkit

  1. Open your Teams app project in Visual Studio Code.

  2. Select Teams Toolkit from the Visual Studio Code activity bar.

  3. Select View How-to Guides in the DEVELOPMENT section.

    Screenshot shows the option to select View How-to Guides under Development.

  4. From the dropdown list that appears, select the cloud service integration you want to add to your app. You're redirected to the respective How-to Guide.

    Screenshot shows the Cloud service integration options in View How-to Guides.

    Cloud service integration How-to Guide
    Integrate with Azure Functions How to Integrate Azure Functions with your Teams app
    Integrate with Azure SQL Database How to Integrate Azure SQL Database with your Teams app
    Integrate with Azure API Management How to Integrate Azure API Management with your Teams App and export the API to power app
    Integrate with Azure Key Vault How to Integrate Azure Key Vault with your Teams app

To add cloud resources using Command Palette

  1. Open your Teams app project in Visual Studio Code.

  2. Select View > Command Palette... or Ctrl+Shift+P.

    Screenshot shows the Command Palette option under View.

  3. Enter How-to Guides and select Teams:View How-to Guides from the list.

    Screenshot shows the selection of View how-to guides from the list.

  4. From the dropdown list that appears, select the capability you want to add to your app. You're redirected to the respective How-to Guide.

    Screenshot shows the capabilities in View How-to Guides list.

    Cloud service integration How-to Guide
    Integrate with Azure Functions How to Integrate Azure Functions with your Teams app
    Integrate with Azure SQL Database How to Integrate Azure SQL Database with your Teams app
    Integrate with Azure API Management How to Integrate Azure API Management with your Teams App and export the API to power app
    Integrate with Azure Key Vault How to Integrate Azure Key Vault with your Teams app

Add API connection

Add a connection to an existing API, developed by your organization or a third party, using the following steps:

  1. Open your Teams app project in Microsoft Visual Studio Code.

  2. Select Teams Toolkit from the Visual Studio Code activity bar.

  3. Select View How-to Guides in the DEVELOPMENT section.

    Screenshot shows the option to select View How-to Guides under Development.

  4. From the dropdown list that appears, select Connect to an API. You're redirected to the respective How-to Guide.

    Screenshot shows the selection of Connect to an API option in the View How-to Guides list.

    Development How-to Guide
    Connect to an API How to integrate API Connection with your Teams app

See also