Updates from: 01/11/2022 02:12:43
Service Microsoft Docs article Related commit history on GitHub Change details
platform Meeting App Extensibility https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/apps-in-teams-meetings/meeting-app-extensibility.md
A guest or anonymous user can't add, remove, or uninstall apps.
The following table provides the user types and lists the features that each user can access:
-| User type | Tabs | Bots | Messaging extensions | Adaptive Cards | Task modules | In-meeting dialog | Meeting Stage |
-| :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |
-| Anonymous user | Not available | Not available | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. | Not available | Can view and interact with app on the meeting stage |
-| Guest, part of the tenant AAD | Interaction is allowed. Create, update, and delete aren't allowed. | Not available | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. | Available | Can start, view, and interact with app on the meeting stage |
-| Federated user, for more information, see [non-standard users](/microsoftteams/non-standard-users). | Interaction is allowed. Create, update, and delete aren't allowed. | Interaction is allowed. Acquire, update, and delete aren't allowed. | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. | Not available | Can start, view, and interact with app on the meeting stage |
+| User type | Tabs | Bots | Messaging extensions | Adaptive Cards | Task modules | In-meeting dialog | Meeting Stage | Content bubble |
+| :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |
+| Anonymous user | Not available | Not available | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. | Not available | Can view and interact with app on the meeting stage | Not available |
+| Guest, part of the tenant AAD | Interaction is allowed. Create, update, and delete aren't allowed. | Not available | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. | Available | Can start, view, and interact with app on the meeting stage | Available |
+| Federated user, for more information, see [non-standard users](/microsoftteams/non-standard-users). | Interaction is allowed. Create, update, and delete aren't allowed. | Interaction is allowed. Acquire, update, and delete aren't allowed. | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. | Not available | Can start, view, and interact with app on the meeting stage | Not available |
## Next step
platform Teams Store Validation Guidelines https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/concepts/deploy-and-publish/appsource/prepare/teams-store-validation-guidelines.md
description: Describes the guidelines every app submitted to the Teams store (Ap
+ms.localizationpriority: medium
# Microsoft Teams store validation guidelines
platform Feedback https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/feedback.md
Title: Microsoft Teams developer support and feedback
+ Title: Microsoft Teams developer community help and feedback
description: The Microsoft Teams product team responds to the developer community across various feedback and support channels. ms.localizationpriority: medium
-keywords: teams feedback developer questions issues contact support request bugs contributions community discussions
+keywords: teams feedback developer questions issues contact community help request bugs contributions community discussions support
# Microsoft Teams developer community channels
-Microsoft Teams community of developers use Stack Overflow to connect with other developers to ideate, get clarifications, and submit queries. In addition, you can also use one of the following contacts or sites, depending on the type of support required to submit your queries, doubts, or clarifications. You can also get product-specific information, such as issues, limitations, and general questions about Microsoft Teams:
-
-| **Support type** | **Contact** |
-|--||
-| **Bot and Messaging Extension SDK issues or suggestions** | Submit issues and feature requests to the SDK repository for your bot's language ([C#](https://github.com/Microsoft/botbuilder-dotnet/), [Javascript](https://github.com/Microsoft/botbuilder-js), or [Python](https://github.com/Microsoft/botbuilder-python)). Post How-to questions at [Stack Overflow](https://stackoverflow.com/questions/tagged/botframework%20microsoft-teams) using the `botframework & microsoft-teams` tag. |
-| **Community chat group** | Select **SIGN IN TO START TALKING** to join the informal community chat room for [Microsoft Teams app developers](https://gitter.im/OfficeDev/MicrosoftTeamsAppDev), if you are signing in for the first time. Select **JOIN ROOM** if you are already logged in. |
-| **Community support** | <ul><li> [Stack Overflow](https://stackoverflow.com/questions/tagged/microsoft-teams): Use the `botframework & microsoft-teams` tag to post the questions. You must follow the Stack Overflow guidelines, such as provide a descriptive title, a complete and concise problem statement, along with sufficient detail to reproduce your issue. Feature requests or broad questions are off-topic. If you are a new user, for more information, see Stack Overflow Help Center. </li> <li> [Microsoft Q&A](/answers/topics/office-teams-app-dev.html): Use the `office-teams-app-dev` tag to post questions. We love Stack Overflow and our extensive support is assured for customers who ask questions there. However, Stack Overflow has specific criteria about questions that are appropriate for the community and [Microsoft Q&A](/answers/topics/office-teams-app-dev.html) has an open policy regarding this. </li> </ul> |
-| **Teams Toolkit or TeamsFx SDK and CLI issues** | <ul><li> [Github Issues](https://github.com/OfficeDev/TeamsFx/issues) Create new issues on the [TeamsFx (Microsoft Teams Framework) GitHub repository](https://github.com/OfficeDev/TeamsFx) to report issues or raise feature request. We recommend to use Github Issues for queries and to receive support. <li> [Stack Overflow](https://stackoverflow.com/questions/tagged/teams-toolkit): Use the `teams-toolkit` tag to post questions. You can follow the Stack Overflow guidelines, such as provide a descriptive title, a complete and concise problem statement, along with sufficient detail to reproduce your issue. Feature requests or broad questions are off-topic. </li> </ul> |
-| **Documentation issues** | Select `This page` in the **Submit and view feedback** section available at the footer of the documentation, to open an [issue](https://github.com/MicrosoftDocs/msteams-docs/issues) on the Microsoft Teams documentation GitHub repository. |
-| **Documentation updates** | Select **Edit** in the article you want to update, and submit a pull request to the [Microsoft Teams documentation GitHub](https://github.com/MicrosoftDocs/msteams-docs) repository. |
-| **Features suggestions** | Post feature suggestions on [Microsoft Teams feedback portal on UserVoice](https://microsoftteams.uservoice.com/forums/555103-public-preview/category/182881-developer-platform). |
-| **General questions** |Send general questions about the Microsoft Teams developer platform to [Microsoft Teams Community Help](mailto:microsoftteamsdev@microsoft.com). We encourage posting questions on the channels mentioned here and use email only if no other mode of communication is applicable. |
-| **Samples** | Submit issues with samples to respective [Microsoft Teams Samples](https://github.com/OfficeDev/Microsoft-Teams-Samples) repository.|
-| **Tab SDK issues or suggestions** | Submit issues and feature requests to the SDK repository for [Microsoft Teams JavaScript Library](https://github.com/OfficeDev/microsoft-teams-library-js/issues). Use the `microsoft-teams` tag to post how-to questions about the SDK at [Stack Overflow](https://stackoverflow.com/questions/tagged/microsoft-teams). |
-
-## Product support channels
-The following table lists the support channels to submit Teams product related queries:
-
-| **Support type** | **Contact** |
-|--||
-| **Microsoft Teams product issues and failures** | Tenant Admin can reach out to [Microsoft 365 Product Support](/microsoft-365/admin/contact-support-for-business-products). |
-| **General questions about Microsoft Teams** | Submit your questions on [Microsoft Teams Community](https://answers.microsoft.com/en-us/msteams/forum). |
+Microsoft Teams community of developers use Stack Overflow to connect with other developers to ideate, get clarifications, and submit queries. In addition, developers can also use other contacts or sites, depending on the type of community help required to submit issues, limitations, and general questions. Developers can also get product-specific information.
+
+## Product community channels
+
+The following table lists the community help channels to submit the product-related queries.
+
+| **Community channel** | **Contact** |
+|:|:|
+| **Microsoft Teams product issues and failures** | Tenant administrator can reach out to [Microsoft 365 Product Support](/microsoft-365/admin/contact-support-for-business-products). |
+| **General questions about Microsoft Teams** | Submit your questions on :::image type="icon" source="assets/icons/Teams-icon.png" border="false"::: [Microsoft Teams Community](https://answers.microsoft.com/en-us/msteams/forum). |
+
+## Community help
+
+### Community forums
+
+Get answers to your Microsoft product and service questions with responses from other community members.
+
+| **Community channel**| **Contact** |
+|:|:|
+| **Community chat group** | Use the informal community chat room for :::image type="icon" source="assets/icons/Teams-icon.png" border="false"::: [Microsoft Teams app developers](https://gitter.im/OfficeDev/MicrosoftTeamsAppDev). Select **SIGN IN TO START TALKING**, if signing in for the first time. Select **JOIN ROOM**, if already logged in. |
+|**Community help** | <ul> <li>[Stack Overflow](https://stackoverflow.com/questions/tagged/microsoft-teams): Use the `botframework & microsoft-teams` tag to post the questions. Follow the Stack Overflow guidelines such as provide a descriptive title, a concise problem statement, and details to reproduce the issue. Feature requests or broad questions are off-topic. If you are a new user, see [Stack Overflow Help Center](https://stackoverflow.com/help).</li> <li> [Microsoft Q&A](/answers/topics/office-teams-app-dev.html): Use the `office-teams-app-dev` tag to post questions. We love Stack Overflow and provide extensive support to questions posted on Stack Overflow. Stack Overflow has criteria about appropriate questions and [Microsoft Q&A](/answers/topics/office-teams-app-dev.html) has an open policy regarding this. </li><ul> |
+
+### Report issues
+
+Submit issues and ask general questions using the community help channels.
+
+| **Community channel** | **Contact** |
+|:-|:|
+| **General questions** | Send general questions about the Microsoft Teams developer platform to [Microsoft Teams Community Help](mailto:microsoftteamsdev@microsoft.com). We encourage posting questions on the channels mentioned here and use email only if no other mode of communication is applicable. |
+| **Samples** | Submit issues with samples to respective [Microsoft Teams Samples](https://github.com/OfficeDev/Microsoft-Teams-Samples) repository.|
+| **Teams Toolkit or TeamsFx SDK and CLI issues** | <ul><li> :::image type="icon" source="assets/icons/GitHub-icon.png" border="false"::: [GitHub Issues](https://github.com/OfficeDev/TeamsFx/issues): Create new issues on the [TeamsFx (Microsoft Teams Framework) GitHub repository](https://github.com/OfficeDev/TeamsFx) to report issues or raise feature request. We recommend using GitHub issues for queries and to receive community help. <li> [Stack Overflow](https://stackoverflow.com/questions/tagged/teams-toolkit): Use the `teams-toolkit` tag to post questions. Follow the Stack Overflow guidelines such as provide a descriptive title, a concise problem statement, and details to reproduce the issue. Feature requests or broad questions are off-topic. </li> </ul> |
+
+### Documentation feedback
+
+Submit documentation feedback or updates using the community help channels.
+
+| **Community channel** | **Contact** |
+|:-|:|
+| **Documentation issues** | Select `This page` in the **Submit and view feedback** section available at the footer of the documentation, to open an [issue](https://github.com/MicrosoftDocs/msteams-docs/issues) on the Microsoft Teams documentation GitHub repository. <br> :::image type="content" source="assets/images/community-feedback-this-page.png" alt-text="This page feedback":::|
+| **Documentation updates** | Select **Edit** in the article you want to update, and submit a pull request to the :::image type="icon" source="assets/icons/GitHub-icon.png" border="false"::: [Microsoft Teams documentation GitHub](https://github.com/MicrosoftDocs/msteams-docs) repository.:::image type="content" source="assets/images/community-feedback-edit.png" alt-text="Edit feedback":::|
+
+### Help and feature request
+
+Submit feedback and feature requests for Microsoft Teams using the community help channels.
+
+| **Community channel** | **Contact** |
+|:-|:|
+| **Features suggestions** | Post feature suggestions on :::image type="icon" source="assets/icons/Teams-icon.png" border="false"::: [Microsoft Teams feedback portal on UserVoice](https://microsoftteams.uservoice.com/forums/555103-public-preview/category/182881-developer-platform). |
+| **Bot and Messaging Extension SDK issues or suggestions** | Submit issues and feature requests to the SDK repository for your bot's language ([C#](https://github.com/Microsoft/botbuilder-dotnet/), [JavaScript](https://github.com/Microsoft/botbuilder-js), or [Python](https://github.com/Microsoft/botbuilder-python)). Post How-to questions at [Stack Overflow](https://stackoverflow.com/questions/tagged/botframework%20microsoft-teams) using the `botframework & microsoft-teams` tag. |
+| **Tab SDK issues or suggestions** | Submit issues and feature requests to the SDK repository for [Microsoft Teams JavaScript Library](https://github.com/OfficeDev/microsoft-teams-library-js/issues). Use the `microsoft-teams` tag to post how-to questions about the SDK at [Stack Overflow](https://stackoverflow.com/questions/tagged/microsoft-teams). |
## See also
platform Add Authentication https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/messaging-extensions/how-to/add-authentication.md
To prompt an unauthenticated user to sign in, respond with a suggested action of
``` > [!NOTE]
-> For the sign in experience to be hosted in a Teams pop-up window, the domain portion of the URL must be in your appΓÇÖs list of valid domains. For more information, see [validDomains](~/resources/schem#validdomains) in the manifest schema.
+> * For the sign in experience to be hosted in a Teams pop-up window, the domain portion of the URL must be in your appΓÇÖs list of valid domains. For more information, see [validDomains](~/resources/schem#validdomains) in the manifest schema.
+> * The size of the authentication pop-up can be defined by including query string parameters of width and height, `Value = $"{_siteUrl}/searchSettings.html?settings={escapedSettings}",`.
### Start the sign in flow
platform Teamsfx CLI https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/TeamsFx-CLI.md
Last updated 11/29/2021
-# TeamsFx Command Line Interface
+# TeamsFx command line interface
-TeamsFx CLI is a text-based command line interface that accelerates Teams application development. It aims you to provide keyboard-centric experience when building Teams applications. It also enables CI/CD scenario where CLI can be easily integrated in scripts for automation.
+TeamsFx CLI is a text-based command line interface that accelerates Teams application development. It aims to provide keyboard centric experience while building Teams applications. It also enables CI/CD scenario where you can integrate CLI in scripts for automation.
+For more information, see:
* [Source code](https://github.com/OfficeDev/TeamsFx/tree/dev/packages/cli) * [Package (NPM)](https://www.npmjs.com/package/@microsoft/teamsfx-cli) ## Get Started
-Let's start by installing `teamsfx-cli` from `npm` and run `teamsfx -h` to check all available commands:
+Install `teamsfx-cli` from `npm` and run `teamsfx -h` to check all available commands:
```bash npm install -g @microsoft/teamsfx-cli teamsfx -h ```
-## Supported Commands
-
-| `teamsfx` Commands | Descriptions |
-|:- |:-|
-| `teamsfx new` | Create a new Teams application. |
-| `teamsfx account` | Manage cloud service accounts. The supported cloud services are 'Azure' and 'Microsoft 365'. |
-| `teamsfx env` | Manage the environments. |
-| `teamsfx capability`| Add new capabilities to the current application. |
-| `teamsfx resource` | Manage the resources in the current application. |
-| `teamsfx provision` | Provision the cloud resources in the current application. |
-| `teamsfx deploy` | Deploy the current application. |
-| `teamsfx package` | Build your Teams app into a package for publishing. |
-| `teamsfx validate` | Validate the current application. |
-| `teamsfx publish` | Publish the app to Teams. |
-| `teamsfx preview` | Preview the current application. |
-| `teamsfx config` | Manage the configuration data. |
+## Supported commands
+
+| Command | Description |
+|-|-|
+| `teamsfx new`| Create new Teams application.|
+| `teamsfx account`| Manage cloud service accounts. The supported cloud services are 'Azure' and 'Microsoft 365'. |
+| `teamsfx env` | Manage environments. |
+| `teamsfx capability`| Add new capabilities to the current application.|
+| `teamsfx resource` | Manage the resources in the current application.|
+| `teamsfx provision` | Provision cloud resources in the current application.|
+| `teamsfx deploy` | Deploy the current application. |
+| `teamsfx package` | Build your Teams app into package for publishing.|
+| `teamsfx validate` | Validate the current application.|
+| `teamsfx publish` | Publish the app to Teams.|
+| `teamsfx preview` | Preview the current application. |
+| `teamsfx config` | Manage the configuration data. |
| `teamsfx permission`| Collaborate with other developers in same project.| ## `teamsfx new`
-`teamsfx new` will by default go into interactive mode and guide you through the process of creating a new Teams application by asking few questions. You can also do it in non-interactive mode by setting `--interactive` flag to `false`.
+By default, `teamsfx new` goes into interactive mode and guides you through the process of creating a new Teams application. You can also work with non-interactive mode by setting `--interactive` flag to `false`.
-| `teamsFx new` Commands | Descriptions |
+| `teamsFx new` Command | Description |
|:- |:-| | `teamsfx new template <template-name>` | Create an app from an existing template | | `teamsfx new template list` | List all the available templates | ### Parameters for `teamsfx new`
-| Parameters | Required | Descriptions |
-|:- |:-|:-|
+| Parameter | Requirement | Description |
+|:- |:-|:-|
|`--app-name` | Yes| Name of your Teams application.|
-|`--interactive`| No | Select the options interactively. Options are `true` and `false`. The default value is `true`.|
-|`--capabilities`| No| Choose Teams application capabilities, multiple Options are: `tab`, `bot`, `messaging-extension` and `tab-spfx`. The default value is: `tab`.|
-|`--programming-language`| No| Programming Language for the project. Options are `javascrip` or `typescript` and default value is: `javascript`.|
-|`--folder`| No | Project directory. A sub folder with the your app name will be created under this directory. The default value is: `./`.|
-|`--spfx-framework-type`| No| Applicable if `Tab(SPfx)` capability is selected. Frontend Framework. Options are `none` and `react`, the default value is: `none`.|
-|`--spfx-web part-name`| No | Applicable if `Tab(SPfx)` capability is selected. Web part Name. The default value is: "helloworld". |
-|`--spfx-web part-desp`| No | Applicable if `Tab(SPfx)` capability is selected. Web part Description. The default value is: "helloworld description". |
-|`--azure-resources`| No| Applicable if contains `tab` capability. Add Azure resources to your project. Options(Multiple) are `sql` (Azure SQL Database) and `function` (Azure Functions). |
+|`--interactive`| No | Select the options interactively. The options are `true` and `false` and default value is `true`.|
+|`--capabilities`| No| Choose Teams application capabilities, the multiple options are `tab`, `bot`, `messaging-extension` and `tab-spfx`. The default value is `tab`.|
+|`--programming-language`| No| Programming language for the project. The options are `javascript` or `typescript` and default value is `javascript`.|
+|`--folder`| No | Project directory. A sub folder with your app name is created under this directory. The default value is `./`.|
+|`--spfx-framework-type`| No| Applicable if `Tab(SPfx)` capability is selected. Frontend Framework. The options are `none` and `react`, and default value is `none`.|
+|`--spfx-web part-name`| No | Applicable if `Tab(SPfx)` capability is selected. The default value is "helloworld".|
+|`--spfx-web part-desp`| No | Applicable if `Tab(SPfx)` capability is selected. The default value is "helloworld description". |
+|`--azure-resources`| No| Applicable if contains `tab` capability. Add Azure resources to your project. The multiple options are `sql` (Azure SQL Database) and `function` (Azure Functions). |
### Scenarios for `teamsfx new`
-Using interactive mode to create a Teams app is super intuitive, please try it by starting with `teamsfx new`. The following are the few scenerios on controlling all the parameters:
+You can use interactive mode to create a Teams app.The scenarios on controlling all the parameters with `teamsfx new` are as follows:
-#### A tab app hosted on SPFx using React
+#### Tab app hosted on SPFx using React
```bash teamsfx new --interactive false --app-name newspfxapp --capabilities tab-spfx --spfx-framework-type react ```
-#### A Teams app in JavaScript contains tab, bot capabilities and Azure Functions
+#### Teams app in JavaScript with tab, bot capabilities and Azure Functions
```bash teamsfx new --interactive false --app-name newtabbotapp --capabilities tab bot --programming-language javascript --azure-resources function ```
-#### A Teams tab app with Azure Functions and Azure SQL
+#### Teams tab app with Azure Functions and Azure SQL
```bash teamsfx new --interactive false app-name newapp --azure-resources sql function --programming-language typescript
teamsfx new --interactive false app-name newapp --azure-resources sql function -
Manage cloud service accounts. The supported cloud services are `Azure` and `Microsoft 365`.
-| `teamsFx account` Commands | Descriptions |
+| `teamsFx account` Command | Description |
|:- |:-|
-| `teamsfx account login <service>` | Log in to the selected cloud service. |
-| `teamsfx account logout <service>` | log out of selected cloud service. |
-| `teamsfx account set --subscription` | Update account settings to set a subscription ID. |
+| `teamsfx account login <service>` | Log in to the selected cloud service. |
+| `teamsfx account logout <service>` | log out of selected cloud service. |
+| `teamsfx account set --subscription` | Update account settings to set a subscription ID. |
## `teamsfx env` Manage the environments.
-| `teamsfx env` Commands | Descriptions |
+| `teamsfx env` Command | Description |
|:- |:-| | `teamsfx env add <new_env_name> --env <existing_env_name>` | Add a new environment by copying from the specified environment. | | `teamsfx env list` | List all environments. | ### Scenarios for `teamsfx env`
+The scenarios for `teamsfx env` are as follows:
+ #### Create a new environment Add a new environment by copying from the existing dev environment:
teamsfx env add staging --env dev
Add new capabilities to the current application.
-| `teamsFx capability` Commands | Descriptions |
+| `teamsFx capability` Command | Description |
|:- |:-|
-| `teamsfx capability add tab` | Add a tab. |
-| `teamsfx capability add bot` | Add a bot. |
-| `teamsfx capability add messaging-extension` | Add a Messaging Extension. |
+| `teamsfx capability add tab` | Add tab |
+| `teamsfx capability add bot` | Add bot |
+| `teamsfx capability add messaging-extension`| Add messaging extension |
> [!NOTE]
-> Once your project include a bot, messaging extension cannot be added any more and it applies vice versa. You can include both bot and messaging extensions in your project when creating a new Teams app project.
+> If your project includes a bot, messaging extension can't be added and it applies vice versa. You can include both bot and messaging extensions in your project while creating a new Teams app project.
## `teamsfx resource` Manage the resources in the current application. Supported `<resource-type>` are: `azure-sql`, `azure-function` and `azure-apim` .
-| `teamsFx resource` Commands | Descriptions |
+| `teamsFx resource` Command | Description |
|:- |:-|
-| `teamsfx resource add <resource-type>` | Add a resource into current application.|
+| `teamsfx resource add <resource-type>` | Add resource into current application.|
| `teamsfx resource show <resource-type>` | Show configuration details of the resource. | | `teamsfx resource list` | List all the resources in the current application. | ### Parameters for `teamsfx resource add azure-function`
-| Parameters | Required | Descriptions |
-|:- |:-|:-|
-|`--function-name`| Yes | Provide a function name. The default value is: `getuserprofile`. |
+| Parameter | Requirement | Description |
+|- |-|-|
+|`--function-name`| Yes | Provide a function name. The default value is `getuserprofile`. |
### Parameters for `teamsfx resource add azure-sql` #### `--function-name`
-| Parameters | Required | Descriptions |
+| Parameter | Requirement | Description |
|:- |:-|:-|
-|`--function-name`| Yes | Provide a function name. The default value is: `getuserprofile`. |
+|`--function-name`| Yes | Provide a function name. The default value is `getuserprofile`. |
> [!NOTE]
-> Function name is verified as SQL needs to be accessed from server workload. If your project doesn't contain `Azure Functions`, it will created one for you.
+> The function name is verified as SQL and needs to be accessed from server workload. If your project doesn't contain `Azure Functions`, create one for you.
### Parameters for `teamsfx resource add azure-apim` > [!TIP]
-> Below options will take effect when you try to use an existing `APIM` instance. By default, you don't have to specify any options and it will create a new instance during `teamsfx provision` step.
+> The options take effect when you try to use an existing `APIM` instance. By default, you don't have to specify any options and it creates a new instance during `teamsfx provision` step.
-| Parameters | Required | Descriptions |
+| Parameter | Requirement | Description |
|:- |:-|:-| |`--subscription`| Yes | Select an Azure subscription| |`--apim-resource-group`| Yes| The name of resource group. |
-|`--apim-service-name`| Yes | The name of the API Management service instance. |
-|`--function-name`| Yes | Provide a function name. The default value is: `getuserprofile`. |
+|`--apim-service-name`| Yes | The name of the API management service instance. |
+|`--function-name`| Yes | Provide a function name. The default value is `getuserprofile`. |
> [!NOTE]
-> We ask for function name because `Azure API Management` needs to work with `Azure Functions`. If your project doesn't contain `Azure Functions` we will create one for you.
+> `Azure API Management` needs to work with `Azure Functions`. If your project doesn't contain `Azure Functions`, you can create one.
## `teamsfx provision`
Provision the cloud resources in the current application.
### Parameters for `teamsfx provision`
-| Parameters | Required | Descriptions |
+| Parameter | Requirement | Description |
|:- |:-|:-| |`--env`| Yes| Select an environment for the project. | |`--subscription`| No | Specify an Azure Subscription ID. |
Provision the cloud resources in the current application.
## `teamsfx deploy`
-This command is used to deploy the current application. By default it will deploy entire project but it's also possible to deploy partially. Options(Multiple) are: `frontend-hosting`, `function`, `apim`, `teamsbot`, `spfx`.
+This command is used to deploy the current application. By default it deploys entire project but it's also possible to deploy partially. The multiple options are `frontend-hosting`, `function`, `apim`, `teamsbot`, and `spfx`.
### Parameters for `teamsfx deploy`
-| Parameters | Required | Descriptions |
+| Parameter | Requirement | Description |
|:- |:-|:-| |`--env`| Yes| Select an existing environment for the project. |
-|`--open-api-document`| No | Applicable when there is APIM resource in the project. The Open API document file path. |
-|`--api-prefix`| No | Applicable when there is APIM resource in the project. The API name prefix. The default unique name of the API will be `{api-prefix}-{resource-suffix}-{api-version}`. |
+|`--open-api-document`| No | Applicable when there is APIM resource in the project. The open API document file path. |
+|`--api-prefix`| No | Applicable when there is APIM resource in the project. The API name prefix. The default unique name of the API is `{api-prefix}-{resource-suffix}-{api-version}`. |
|`--api-version`| No | Applicable when there is APIM resource in the project. The API version. | ## `teamsfx validate`
-Validate current application. This command will validate your application's manifest file.
+Validate current application. This command validates your application's manifest file.
### Parameters for `teamsfx validate`
-`--env`: (Required) Select an existing environment for the project.
+`--env`: Select an existing environment for the project.
## `teamsfx publish`
Publish the app to Teams.
### Parameters for `teamsfx publish`
-`--env`: (Required) Select an existing environment for the project.
+`--env`: Select an existing environment for the project.
## `teamsfx package`
Preview the current application from local or remote.
### Parameters for `teamsfx preview`
-| Parameters | Required | Descriptions |
+| Parameter | Requirement | Description |
|:- |:-|:-| |`--local`| No | Preview the application from local. `--local` is exclusive with `--remote`. | |`--remote`| No | Preview the application from remote. `--remote` is exclusive with `--local`. |
-|`--env`| No | Select an existing environment for the project when parameter `--remote` appended. |
+|`--env`| No | Select an existing environment for the project when parameter `--remote` is appended. |
|`--folder`| No | Project root directory. The default value is `./`. |
-|`--browser`| No | The browser to open Teams web client. Options are `chrome`, `edge` and `default` (system default browser). The default value is `default`. |
-|`--browser-arg`| No | Argument to pass to the browser, requires --browser, can be used multiple times (e.g. --browser-args="--guest") |
-|`--sharepoint-site`| No | SharePoint site URL, like `{your-tenant-name}.sharepoint.com` (only for SPFx project remote preview). |
+|`--browser`| No | The browser to open Teams web client. The options are `chrome`, `edge` and `default` such as system default browser and the value is `default`. |
+|`--browser-arg`| No | Argument to pass to the browser, requires --browser, can be used multiple times, for example, --browser-args="--guest" |
+|`--sharepoint-site`| No | SharePoint site URL, such as `{your-tenant-name}.sharepoint.com` for SPFx project remote preview. |
### Scenarios for `teamsfx preview`
teamsfx preview --remote
teamsfx preview --remote --browser edge ```
-> [!Note]
-> The logs of the background services like React will be saved in `~/.fx/cli-log/local-preview/`.
+> [!NOTE]
+> The logs of the background services, such as React is saved in `~/.fx/cli-log/local-preview/`.
## `teamsfx config` Manage the configuration data either in user scope or project scope.
-| `teamsfx config` Commands | Descriptions |
+| `teamsfx config` Command | Description |
|:- |:-| | `teamsfx config get [option]` | View the configuration value of option | | `teamsfx config set <option> <value>` | Update the configuration value of option | ### Parameters for `teamsfx config`
-| Parameters | Required | Descriptions |
+| Parameter | Requirement | Description |
|:- |:-|:-| |`--env`| Yes | Select an existing environment for the project. |
-|`--folder`| No | Project directory. This is used when get/set project configuration. The default value is: `./`. |
-|`--global`| No | Cope of configuration. If this is true, the scope is limited to user scope instead of project scope. The default value is: `false`. Currently supported global configurations including: `telemetry`, `validate-dotnet-sdk`, `validate-func-core-tools`, `validate-node`. |
+|`--folder`| No | Project directory. This is used for get or set project configuration. The default value is `./`. |
+|`--global`| No | Cope of configuration. If this is true, the scope is limited to user scope instead of project scope. The default value is `false`. At present, the supported global configurations include `telemetry`, `validate-dotnet-sdk`, `validate-func-core-tools`, `validate-node`. |
### Scenerios for `teamsfx config`
-Secrets in `.userdata` file are encrypted, `teamsfx config` could help you view / update these values.
+Secrets in `.userdata` file are encrypted, `teamsfx config` and can help you to view or update the values.
#### Stop sending telemetry data
teamsfx config set telemetry off
#### Disable environment checker
-There are three configs to turn on/off Node.js, .NET SDK and Azure Functions Core Tools validation, and all of them are enabled by default. You are able to set the config to "off" if you do not need the dependencies validation and would like to install the dependencies by yourself. Check the [Node.js installation guide](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/vscode-extension/envchecker-help.md#how-to-install-nodejs), [.NET SDK installation guide](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/vscode-extension/envchecker-help.md#how-to-install-net-sdk) and [Azure Functions Core Tools installation guide](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/vscode-extension/envchecker-help.md#how-to-install-azure-functions-core-tools).
+There are three configuration to turn on or off Node.js, .NET SDK and Azure Functions Core Tools validation, and all of them are enabled by default. You can set the configuration to "off" if you don't need the dependencies validation and want to install the dependencies by yourself. Check the following guides:
+* [Node.js installation guide](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/vscode-extension/envchecker-help.md#how-to-install-nodejs)
+* [.NET SDK installation guide](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/vscode-extension/envchecker-help.md#how-to-install-net-sdk)
+* [Azure Functions Core Tools installation guide](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/vscode-extension/envchecker-help.md#how-to-install-azure-functions-core-tools).
-For example, to disable .NET SDK validation, you can use the following command.
+To disable .NET SDK validation, you can use the following command:
```bash teamsfx config set validate-dotnet-sdk off ```
-To enable .NET SDK validation, you can use the following command.
+To enable .NET SDK validation, you can use the following command:
```bash teamsfx config set validate-dotnet-sdk on
teamsfx config get -g
#### View all the configuration in project
-The secret will automatically decrypted:
+The secret is automatically decrypted:
```bash teamsfx config get --env dev
teamsfx config set fx-resource-aad-app-for-teams.clientSecret xxx --env dev
## `teamsfx permission`
-TeamsFx CLI provides `teamsFx permission` Commands for collaboration scenario.
+TeamsFx CLI provides `teamsFx permission` commands for collaboration scenario.
-| `teamsFx permission` Commands | Descriptions |
+| `teamsFx permission` command | Description |
|:|-| | `teamsfx permission grant --env --email` | Grant permission for collaborator's Microsoft 365 account for the project of a specified environment. | | `teamsfx permission status` | Show permission status for the project | ### Parameters for `teamsfx permission grant`
-| Parameters | Required | Descriptions |
+| Parameter | Requirement | Description |
|:- |:-|:-| |`--env`| Yes | Provide env name. |
-|`--email`| Yes | Provide collaborator's Microsoft 365 email address. Note that the collaborator's account should be in the same tenant with creator. |
+|`--email`| Yes | Provide collaborator's Microsoft 365 email address. Ensure the collaborator's account is in the same tenant with creator. |
### Parameters for `teamsfx permission status`
-| Parameters | Required | Descriptions |
+| Parameter | Requirement | Description |
|:- |:-|:-| |`--env`| Yes | Provide env name. |
-|`--list-all-collaborators` | No | With this flag, Teams Toolkit CLI will print out all collaborators for this project. |
+|`--list-all-collaborators` | No | With this flag, Teams Toolkit CLI prints all collaborators for this project. |
### Scenarios for `teamsfx permission`
-Here are some examples, for better handling permission for `TeamsFx` projects.
+The permissions for `TeamsFx` projects are as follows:
#### Grant Permission
Project creator and collaborators can use `teamsfx permission grant` command to
teamsfx permission grant --env dev --email user-email@user-tenant.com ```
-After successfully granted permission, project creator and collaborators can share the project with the new collaborator by Github, and the new collaborator will have all permission for Microsoft 365 account.
+After receiving required permission, project creator and collaborators can share the project with the new collaborator by GitHub, and the new collaborator can have all permission for Microsoft 365 account.
#### Show Permission Status
teamsfx permission status --env dev --list-all-collaborators
As a project creator: -- Create a new TeamsFx Tab project (You can also select bot), and the hosting type select Azure.
+- To create a new TeamsFx tab or bot project, and select Azure as the host type:
```bash teamsfx new --interactive false --app-name newapp --host-type azure ``` -- Login Microsoft 365 account and Azure account.
+- To login to Microsoft 365 account and Azure account:
```bash teamsfx account login azure teamsfx account login Microsoft 365 ``` -- Provision your project.
+- To provision your project:
```bash teamsfx provision ``` -- View collaborators. You should see yourself here.
+- To view collaborators:
```bash teamsfx permission status --env dev --list-all-collaborators ```
- ![list-all-collaborators](./images/permission-status-all.png)
-- Add another account as collaborator. Note that the added account must under the same tenant:
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/permission-status-all-1.png" alt-text="permission-1":::
+
+- To add another account as collaborator. Ensure the added account is under the same tenant:
```bash teamsfx permission grant --env dev --email user-email@user-tenant.com ```
- ![add-new-collaborator](./images/permission-grant.png)
-- Push your project to GitHub
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/permission-grant-1.png" alt-text="permission":::
+
+- To push your project to GitHub
As a Project Collaborator: - Clone the project from GitHub.-- Login Microsoft 365 account. Note that the Microsoft 365 account should be the same as added above:
+- Login to Microsoft 365 account. Ensure that the same Microsoft 365 account is added:
```bash teamsfx account login Microsoft 365 ``` -- Login Azure account which has contributor permission for all the Azure resources.
+- Login to Azure account with contributor permission for all Azure resources.
```bash teamsfx account login azure
As a Project Collaborator:
```bash teamsfx permission status --env dev ```- ![permission status](./images/permission-status.png)+ - Update Tab code, and deploy the project to remote. - Launch remote and the project should work fine.+
+## See also
+
+* [TeamsFx SDK for TypeScript or JavaScript](TeamsFx-SDK.md)
+* [Manage multiple environments in Teams Toolkit](TeamsFx-multi-env.md)
+* [Collaborate on Teams project using Teams Toolkit](TeamsFx-collaboration.md)
+
platform Teamsfx SDK https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/TeamsFx-SDK.md
Last updated 11/29/2021
# TeamsFx SDK for TypeScript or JavaScript
-TeamsFx aims to reduce you the tasks of implementing identity and access to cloud resources down to single-line statements with "zero configuration".
+TeamsFx aims to reduce tasks of implementing identity and access to cloud resources to single-line statements with zero configuration.
Use the library to: - Access core functionalities in client and server environment in a similar way. - Write user authentication code in a simplified way.-
- * [Source code](https://github.com/OfficeDev/TeamsFx/tree/main/packages/sdk)
- * [Package (NPM)](https://www.npmjs.com/package/@microsoft/teamsfx)
- * [API reference documentation](https://aka.ms/teamsfx-sdk-help)
- * [Samples](https://github.com/OfficeDev/TeamsFx-Samples)
-
+
## Get started TeamsFx SDK is pre-configured in scaffolded project using TeamsFx toolkit or CLI.
-For more information on Teams app project, see [README](https://github.com/OfficeDev/TeamsFx/blob/main/packages/vscode-extension/README.md).
+For more information, see [Teams app project](https://github.com/OfficeDev/TeamsFx/blob/main/packages/vscode-extension/README.md).
### Prerequisites -- Node.js version `10.x.x` or higher.-- If your project has installed `botbuilder` related [packages](https://github.com/Microsoft/botbuilder-js#packages) as dependencies, ensure they are of the same version and the version `>= 4.9.3`. ([Issue - all of the BOTBUILDER packages should be the same version](https://github.com/BotBuilderCommunity/botbuilder-community-js/issues/57#issuecomment-508538548))
+- Node.js version `10.x.x` or later.
+- If your project has installed `botbuilder` related [packages](https://github.com/Microsoft/botbuilder-js#packages) as dependencies, ensure they are of the same version and the version is `>= 4.9.3`. ([Issue - all of the BOTBUILDER packages should be the same version](https://github.com/BotBuilderCommunity/botbuilder-community-js/issues/57#issuecomment-508538548))
-> [!TIP]
-> A project created by TeamsFx toolkit VS Code extension or CLI tool.
+For more information, see:
+* [Source code](https://github.com/OfficeDev/TeamsFx/tree/main/packages/sdk)
+* [Package (NPM)](https://www.npmjs.com/package/@microsoft/teamsfx)
+* [API reference documentation](https://aka.ms/teamsfx-sdk-help)
+* [Samples](https://github.com/OfficeDev/TeamsFx-Samples)
### Install the `@microsoft/teamsfx` package
Install the TeamsFx SDK for TypeScript or JavaScript with `npm`:
npm install @microsoft/teamsfx ```
-### Create and authenticate a `MicrosoftGraphClient`
+### Create and authenticate `MicrosoftGraphClient`
-To create a graph client object to access the Microsoft Graph API, you will need the credential to do authentication. The SDK provides several credential classes to choose that meets various requirements.You need to load configuration before using any credentials.
+To create graph client object for accessing Microsoft Graph API, you will need the credentials to authenticate. The SDK provides several credential classes to choose that meets various requirements. You need to load configuration before using any credentials.
- In browser environment, you need to explicitly pass in the configuration parameters. The scaffolded React project has provided environment variables to use.
loadConfiguration();
#### Using Teams app user credential
-Use the snippet below:
-
-> [Note]
-> You can only use this credential class in browser application like Teams Tab App.
+Use the following snippet:
```ts loadConfiguration({
const credential = new TeamsUserCredential();
const graphClient = createMicrosoftGraphClient(credential, ["User.Read"]); // Initializes MS Graph SDK using our MsGraphAuthProvider const profile = await graphClient.api("/me").get(); ```
+> [!NOTE]
+> You can use this credential class in browser application, such as Teams Tab App.
#### Using Microsoft 365 tenant credential
-It doesn't require the interaction with Teams App user. You can call Microsoft Graph as application.
-Use the snippet below:
+Microsoft 365 tenant credential doesn't require to interact with Teams App user. You can call Microsoft Graph as application.
+
+Use the following snippet:
```ts loadConfiguration();
const profile = await graphClient.api("/users/{object_id_of_another_people}").ge
### Credentials
-There are 3 credential classes located under [credential](https://github.com/OfficeDev/TeamsFx/tree/main/packages/sdk/src/credential) folder to help simplifying authentication.
+There are 3 credential classes located under [credential folder](https://github.com/OfficeDev/TeamsFx/tree/main/packages/sdk/src/credential) to help simplify authentication.
-Credential classes implement `TokenCredential` interface that is broadly used in Azure library APIs. They are designed to provide access token for specific scopes.
-The credential classes represent different identity under certain scenarios.
+Credential classes implement `TokenCredential` interface that is broadly used in Azure library APIs. They are designed to provide access tokens for specific scopes. The following credential classes represent different identity under certain scenarios:
-`TeamsUserCredential` represent Teams current user's identity. Using this credential will request user consent at the first time.
-`M365TenantCredential` represent Microsoft 365 tenant identity. It is usually used when user is not involved like time-triggered automation job.
-`OnBehalfOfUserCredential` uses on-behalf-of flow. It needs an access token and you can get a new token for different scope. It's designed to be used in Azure Function or Bot scenarios.
+* `TeamsUserCredential` represent Teams current user's identity. Using this credential will request user consent at the first time.
+* `M365TenantCredential` represent Microsoft 365 tenant identity. It is usually used when user is not involved like time-triggered automation job.
+* `OnBehalfOfUserCredential` uses on-behalf-of flow. It needs an access token and you can get a new token for different scope. It's designed to be used in Azure Function or Bot scenarios.
### Bots
-Bot related classes are stored under [bot](https://github.com/OfficeDev/TeamsFx/tree/main/packages/sdk/src/bot) folder.
+Bot related classes are stored under [bot folder](https://github.com/OfficeDev/TeamsFx/tree/main/packages/sdk/src/bot).
-`TeamsBotSsoPrompt` has a good integration with Bot framework. It simplifies the authentication process when you develop bot application.
+`TeamsBotSsoPrompt` can integrate with Bot framework. It simplifies the authentication process for developing bot application.
### Helper functions
-TeamsFx SDK provides helper functions to ease the configuration for third-party libraries. They are located under [core](https://github.com/OfficeDev/TeamsFx/tree/main/packages/sdk/src/core) folder.
+TeamsFx SDK provides helper functions to ease the configuration for third-party libraries. They are located under [core folder](https://github.com/OfficeDev/TeamsFx/tree/main/packages/sdk/src/core).
### Error handling
-API will throw `ErrorWithCode` if error happens. Each `ErrorWithCode` contains error code and error message.
+API error response is `ErrorWithCode`, which contains error code and error message.
-For example, to filter out specific error, you could use the following check:
+For example, to filter out specific error, you can use the following snippet:
```ts try {
try {
} ```
-And if credential instance is used in other library like Microsoft Graph, it's possible that error is caught and transformed.
+And if credential instance is used in other library such as Microsoft Graph, it's possible that error is caught and transformed.
```ts try {
try {
## Scenarios
-The following sections provide several code snippets covering some of the most common scenarios:
--- [Use Graph API in tab app](#use-graph-api-in-tab-app)-- [Call Azure Function in tab app](#call-azure-function-in-tab-app)-- [Access SQL database in Azure Function](#access-sql-database-in-azure-function)-- [Use certificate-based authentication in Azure Function](#use-certificate-based-authentication-in-azure-function)-- [Use Graph API in Bot application](#use-graph-api-in-bot-application)
+The following section provides several code snippets for common scenarios:
### Use Graph API in tab app
dialogs.add(
### Configure log
-You can set customer log level and redirect outputs when using this library.
-Logging is turned off by default, you can turn it on by setting log level.
+You can set customer log level and redirect outputs when using this library. Logging is turned off by default, you can turn it on by setting log level.
#### Enable log by setting log level
-When log level is set, logging is enabled. It prints log information to console by default.
+Logging is enabled only when you set log level. By default, it prints log information to console.
-Set log level using the snippet below:
+Set log level using the following snippet:
```ts // Only need the warning and error messages.
setLogger(context.log);
##### Redirect by setting custom log function
-Note that log function will not take effect if you set a custom logger.
+> [!NOTE]
+> Log function will not take effect, if you set a custom logger.
```ts setLogLevel(LogLevel.Info);
platform Teamsfx Collaboration https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/TeamsFx-collaboration.md
Last updated 11/29/2021
# Collaborate on Teams project using Teams Toolkit
-Multiple developers can work together to debug, provision and deploy for the same TeamsFx project, but it requires manually setting the right permissions of Teams App and AAD App, which is not easy to do.
-
-Teams Toolkit now supports collaboration feature to allow a developer (project owner) to invite other developers (collaborators) to the TeamsFx project to debug, provision and deploy the same TeamsFx project.
+Multiple developers can work together to debug, provision and deploy for the same TeamsFx project, but it requires manually setting the right permissions of Teams App and AAD App.Teams Toolkit supports collaboration feature to allow developers and project owner to invite other developers or collaborators to the TeamsFx project to debug, provision, and deploy the same TeamsFx project.
## Prerequisites * Account prerequisites
- To provision cloud resources in Azure and Microsoft 365, you must have the following accounts with proper permissions. Refer to [Prepare accounts to build Teams app](accounts.md) for more information.
+ To provision cloud resources, you must have the following accounts. For more information, see, [prepare accounts to build Teams app](accounts.md).
- * Microsoft 365
+ * Microsoft 365 subscription
* Azure with valid subscription * [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+. > [!TIP]
-> You should already have a Teams app project opened in VS code.
+> Ensure you have a Teams app project opened in VS code.
## Collaborate with other developers
-### As a project owner
+The following list guides us to understand the collaboration process and its limitation:
+
+### As project owner
> [!NOTE] > Before adding collaborators for an environment, project owner needs to [provision](provision.md) the project first.
-* In **ENVIRONMENT** section on Teams Toolkit, mouse over environment name to find **Collaborators** buttons, one is **Add M365 Teams App (with AAD App) Owners** button, the other one is **List M365 Teams App (with AAD App) Owners** button as shown in the following image:
+* In **ENVIRONMENT** section on Teams Toolkit, select **collaborators**. It displays the options **Add M365 Teams App (with AAD App) Owners** and **List M365 Teams App (with AAD App) Owners** as shown in the following images:
- ![collaboration buttons](./images/collaboration-buttons.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/add collaborators.png" alt-text="collaborators":::
-* Select **Add M365 Teams App (with AAD App) Owners** button and add another M365 account email address as collaborator. The account to be added **must be on the same tenant as project owner for remote debug** as shown in the image:
+* Select **Add M365 Teams App (with AAD App) Owners** and add other M365 account email address as collaborator. The account to be added must be on the same tenant as project owner for remote debug as shown in the image:
- ![input collaborator email](./images/collaboration-add-owner-email.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/manifest preview-1.png" alt-text="add envi":::
-* To view collaborators in current environment, select **List M365 Teams App (with AAD App) Owners** button, then collaborators will be listed in the output channel as shown in following image:
+* To view collaborators in current environment, select **List M365 Teams App (with AAD App) Owners**, then collaborators are listed in the output channel as shown in following image:
- ![collaboration list owners](./images/collaboration-list-owners.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/list of collaborators.png" alt-text="list":::
* Push the project to GitHub. > [!NOTE]
-> Newly added collaborator will not receive any notification. Project owner needs to notify collaborator.
-
-### As a project collaborator
-
-* Clone the project from GitHub
-* Login M365 account
+> Newly added collaborator doesn't receive any notification. Project owner needs to notify collaborator.
-> [!NOTE]
-> Collaborators should log in using the account added by project owner which is **under the same tenant with project owner**.
+### As project collaborator
-* Login Azure account which has contributor permission for all the Azure resources being used in this project.
-* Working on project code, then deploy the project to remote when you think it's time to preview your Teams app.
-* Launch remote to have a preview of the Teams app. For more information, see [build and run your Teams app in remote environment](/microsoftteams/platform/sbs-gs-javascript?tabs=vscode%2Cvsc%2Cviscode%2Cvcode&tutorial-step=3&branch).
+* Clone the project from GitHub.
+* Log in to M365 account.
+* Log in to Azure account, which has contributor permission for all the Azure resources being used in this project.
+* To preview your Teams app, deploy the project to remote.
+* Launch remote to have a preview of the Teams app.
-### Limitations
+For more information, see [build and run your Teams app in remote environment](/microsoftteams/platform/sbs-gs-javascript?tabs=vscode%2Cvsc%2Cviscode%2Cvcode&tutorial-step=3&branch).
> [!NOTE]
-> Azure related permissions should be set manually by Azure subscription administrator on Azure portal. Azure account should have contributor role for the subscription at least so that developers can work together to provision and deploy TeamsFx project.
+> Collaborators must log in using the account added by project owner, which is under the same tenant with project owner.
-1. **Cannot delete**:
-You cannot remove collaborators directly from Teams Toolkit extension. Follow the below steps to remove collaborators manually:
+### Limitation
- 1. Go to [Teams Developer Portal](https:// dev.teams.microsoft.com/apps), find your Teams App by name or app id.
- 2. Inside the Teams App management page, select **Owners** from left panel.
- 3. Find and remove the collaborator.
- 4. Go to [Azure Active Directory](https://ms.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps), select **App registration** from left panel, and find your AAD App.
- 5. Inside the AAD App management page, select **Owners** from left panel.
- 6. Find and remove the collaborator.
+You can't remove collaborators directly from Teams Toolkit extension. Perform the following steps to remove collaborators manually:
+ 1. Go to Teams Developer Portal and select your Teams app by name or app ID.
+ 2. Select **Owners** from left panel.
+ 3. Select and remove the collaborator.
+ 4. Go to [Azure Active Directory](https://ms.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps), select **App registration** from left panel, and find your AAD App.
+ 5. Select **Owners** from left panel in AAD App management page.
+ 6. Select and remove the collaborator.
-1. Collaborator added to your project will not receive any notification. Project owner needs to notify collaborator offline.
+> [!NOTE]
+> * Collaborator added to your project will not receive any notification. Project owner needs to notify collaborator offline.
+> * Azure related permissions must be set manually by Azure subscription administrator on Azure portal. Azure account must have contributor role for the subscription so that developers can work together to provision, and deploy TeamsFx project.
## See also
-> [!div class="nextstepaction"]
-> [Provision cloud resources](provision.md)
-
-> [!div class="nextstepaction"]
-> [Deploy Teams app to the cloud](deploy.md)
-
-> [!div class="nextstepaction"]
-> [Manage multiple environments](TeamsFx-multi-env.md)
+* [Provision cloud resources](provision.md)
+* [Deploy Teams app to the cloud](deploy.md)
+* [Manage multiple environments](TeamsFx-multi-env.md)
platform Teamsfx Manifest Customization https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/TeamsFx-manifest-customization.md
Last updated 11/29/2021
-# Customize Teams App Manifest in Teams Toolkit
+# Customize app manifest in Teams Toolkit
-Teams Toolkit consists of two manifest template files under `templates/appPackage` folder:
+Teams Toolkit consists of the following manifest template files under `templates/appPackage` folder:
- `manifest.local.template.json` - local debug teams app - `manifest.remote.template.json` - shared in all environments
Teams Toolkit consists of two manifest template files under `templates/appPackag
* [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+. > [!TIP]
-> You should already have a Teams app project opened in VS code.
+> Ensure you have Teams app project opened in VS Code.
-During provision, Teams Toolkit will load manifest from `manifest.remote.template.json`, combined with configurations from `state.{env}.json` and `config.{env}.json`. Then it creates a teams app in [Dev Portal](https://dev.teams.microsoft.com/apps) with this manifest.
+During provision, Teams Toolkit loads manifest from `manifest.remote.template.json`, combined with configurations from `state.{env}.json` and `config.{env}.json`, and creates teams app in [Dev Portal](https://dev.teams.microsoft.com/apps).
-During local debug, Teams Toolkit will load manifest from `manifest.local.template.json`, combined with configurations from `localSettings.json`. Then it creates a teams app in [Dev Portal](https://dev.teams.microsoft.com/apps) with this manifest.
+During local debug, Teams Toolkit loads manifest from `manifest.local.template.json`, combined with configurations from `localSettings.json`, and creates teams app in [Dev Portal](https://dev.teams.microsoft.com/apps).
## Supported placeholder in manifest.remote.template.json -- `{{state.xx}}` is pre-defined placeholder whose value is resolved by Teams Toolkit, defined in `state.{env}.json`. You should not modify the values in state.{env}.json.
+- `{{state.xx}}` is pre-defined placeholder whose value is resolved by Teams Toolkit, defined in `state.{env}.json`. Ensure not to modify the values in state.{env}.json.
- `{{config.manifest.xx}}` is customized placeholder whose value is resolved from `config.{env}.json`.
- - You can add a customized parameter by following:
+ - You can add a customized parameter as follows:
- Add a placeholder in manifest.remote.template.json with pattern: `{{config.manifest.xx}}` - Add a config value in config.{env}.json
During local debug, Teams Toolkit will load manifest from `manifest.local.templa
} ```
- Besides each config placeholder in `manifest.remote.template.json`, there is a `Go to config file` button. You can navigate to configuration file by selecting it as shown in the image:
-
- ![go to config file](./images/gotoconfigfile.png)
+ Besides each config placeholder in `manifest.remote.template.json`, there is a `Go to config file`. You can navigate to configuration file by selecting it.
## Supported placeholder in manifest.local.template.json
-`{{localSettings.xx}}` is pre-defined placeholder whose value is resolved by Teams Toolkit, defined in `localSettings.json`. You should not modify the values in localSettings.json.
+`{{localSettings.xx}}` is pre-defined placeholder whose value is resolved by Teams Toolkit, defined in `localSettings.json`. Ensure not to modify the values in localSettings.json.
> [!NOTE]
- > Customization of local manifest is not suggested.
+ > Ensure not to customize the local manifest.
## See also
-> [!div class="nextstepaction"]
-> [Preview Teams App Manifest in Teams Toolkit](TeamsFx-manifest-preview.md)
+[Preview Teams App Manifest in Teams Toolkit](TeamsFx-manifest-preview.md)
platform Teamsfx Manifest Preview https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/TeamsFx-manifest-preview.md
Last updated 11/29/2021
-# Preview Teams app Manifest in Teams Toolkit
+# Preview Teams app manifest in Teams Toolkit
-After scaffolding, you get two manifest template files under `templates/appPackage` folder.
+After scaffolding, the following are the manifest template files available under `templates/appPackage` folder:
- `manifest.local.template.json` - local debug teams app. - `manifest.remote.template.json` - shared between all remote environments.
-These template files containing some placeholders, and the actual values from Teams Toolkit will be resolved in files under `.fx/configs` and `.fx/states`.
+The Template files consisting placeholders, and the actual values from Teams Toolkit are resolved in files under `.fx/configs` and `.fx/states`.
## Prerequisite * [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+. > [!TIP]
-> You should already have a Teams app project opened in VS code.
+> Ensure you have Teams app project opened in VS code.
-## Preview Manifest
+## Preview manifest
-To preview manifest with real content, Teams Toolkit will generate preview manifest files under `build/appPackage` folder:
+To preview manifest with real content, Teams Toolkit generates preview manifest files under `build/appPackage` folder:
```text ΓööΓöÇΓöÇΓöÇbuild
To preview manifest with real content, Teams Toolkit will generate preview manif
ΓööΓöÇΓöÇΓöÇmanifest.local.json - Previewed manifest of local teams app ```
-### Local debug Teams app
+### Preview local manifest file
-To preview manifest file of local teams app, you need to press **F5** to run local debug first. This step will generate default local settings for you, then the app package and preview manifest will be built under **build/appPackage** folder.
+To preview manifest file of local teams app, you need to press **F5** to run local debug. It generates default local settings for you, then the app package and preview manifest builds under **build/appPackage** folder.
-The other ways are:
+You can also preview local manifest by following the steps:
-- Select **Preview** in the codelens of **manifest.local.template.json** file-- Select **Preview manifest file** at the menu bar of **manifest.local.template.json** file-- Select **Zip Teams metadata package** in Treeview and select **Local**
-The preview local appears as shown in the following image:
+1. Select **Preview** in the codelens of **manifest.local.template.json** file.
+2. Select **Preview manifest file** at the menu bar of **manifest.local.template.json** file.
+3. Select **Zip Teams metadata package** in Treeview and select **Local**.
+The preview local appears as shown in the image:
-![preview local](./images/preview.png)
-### Remote environment
+### Preview manifest in remote environment
-To preview manifest file of remote teams app, you need to select **Provision in the cloud** in DEVELOPMENT panel of Teams Toolkit extension Treeview, or trigger **Teams: Provision in the cloud** from command palette first. This step will generate configurations for remote teams app, then the app package and preview manifest will be built under **build/appPackage** folder.
+To preview manifest file of remote teams app, select **Provision in the cloud** in **DEVELOPMENT** panel of Teams Toolkit extension Treeview, or trigger **Teams: Provision in the cloud** from command palette. It generates configuration for remote teams app, and builds package and preview manifest under **build/appPackage** folder.
-The other ways are:
+You can also preview manifest in remote environment by following the steps:
-- Select **Preview** in the codelens of **manifest.remote.template.json** file.-- Select **Preview manifest file** at the menu bar of **manifest.remote.template.json** file.-- Select **Zip Teams metadata package** in Treeview and select your environment.
+1. Select **Preview** in the codelens of **manifest.remote.template.json** file.
+2. Select **Preview manifest file** at the menu bar of **manifest.remote.template.json** file.
+3. Select **Zip Teams metadata package** in Treeview.
+4. Select your environment.
-![preview remote](./images/preview-remote.png)
+If there are more than one environment, you need to select the environment you want to preview as shown in the image:
-> If there are more than one environment, you need to select the env you want to preview as shown in the image:
-![select env](./images/select-env.png)
+## Sync local changes to Dev portal
-## Sync local changes to Dev Portal
+After previewing the manifest file, you can sync your local changes to Dev portal by following the steps:
-After previewing the manifest file, you can sync your local changes to Dev Portal by the following ways:
+1. Select **Update to Teams platform** at the top left corner of `manifest.{env}.json`
+2. Select **Teams: Update manifest to Teams platform** at the menu bar of `manifest.{env}.json`
-- Select **Update to Teams platform** at the top left corner of `manifest.{env}.json`-- Select **Teams: Update manifest to Teams platform** at the menu bar of `manifest.{env}.json`-- Trigger **Teams: update manifest to Teams platform** from command palette
+ You can also trigger **Teams: update manifest to Teams platform** from command palette
-![update](./images/updatetoteamsplatform.png)
-![update-cmd](./images/update_manifest_cmp.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/pre.png" alt-text="tree view":::
> [!NOTE]
-> Trigger from editor codelens or title button will update current manifest file to Teams platform. Trigger from command palette will require selecting target environment.
+> Trigger from editor codelens or **title** will update current manifest file to Teams platform. Trigger from command palette requires selecting target environment.
-If the manifest file is outdated due to configuration file change or template change, user will be asked to confirm their action:
-![manifest-outdated](./images/manifest_outdated_dialog.png)
+If the manifest file is outdated due to configuration file change or template change, ensure to confirm the following action:
+ - **Preview only**: local manifest file will be overwritten according to current configuration-- **Preview and update**: local manifest file will be overwritten according to current configuration and also updated to Teams platform at the same time
+- **Preview and update**: local manifest file will be overwritten according to current configuration and also updated to Teams platform
- **Cancel**: do nothing > [!NOTE]
If the manifest file is outdated due to configuration file change or template ch
## See also
-> [!div class="nextstepaction"]
-> [Customize Teams App Manifest in Teams Toolkit](TeamsFx-manifest-customization.md)
+[Customize Teams App Manifest in Teams Toolkit](TeamsFx-manifest-customization.md)
platform Teamsfx Multi Env https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/TeamsFx-multi-env.md
Last updated 11/29/2021
# Manage multiple environments in Teams Toolkit
- Teams Toolkit provides a simple way for developers to create and manage multiple environments, provision, and deploy artifacts to the target environment for Teams App.
+ Teams Toolkit provides a simple way for you to create and manage multiple environments, provision, and deploy artifacts to the target environment for Teams App.
- With multiple environments, developers can:
+ With multiple environments, you can perform the following:
-1. **Test before production**: It is a common practice to set up multiple environments (dev, test, staging) before publishing a Teams App to production environment in modern app development lifecycle.
+1. **Test before production**: It is a common practice to set up multiple environments such as dev, test, and staging before publishing a Teams App to production environment in modern app development lifecycle.
-2. **Manage app behaviors in different environments**: Developers can set different behaviors for different environment such as developers may want to enable telemetry in production environment but disable it in development environment.
+2. **Manage app behaviors in different environments**: You can set different behaviors for multiple environments such as enable telemetry in production environment but disable it in development environment.
## Prerequisite * [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+.
->[!TIP]
-> You should already have a Teams app project opened in VS code.
+> [!TIP]
+> Ensure you have Teams app project opened in VS code.
## Create a new environment After creating new project, Teams Toolkit by default creates: - One `local` environment to represent the local machine environment configurations.-- One `dev` environment to represent the remote/cloud environment configurations.
+- One `dev` environment to represent the remote or cloud environment configurations.
> [!NOTE] > Each project can have only one `local` environment but multiple remote environments.
-To add another remote environment, select the Teams icon in the sidebar, click the Plus button under Environment section, and follow the questions to create as shown in the following image:
+To add another remote environment, select the Teams icon in the sidebar, select create new environment the under Environment section as shown in the following image:
-![add-env](./images/create-env.png)
> [!NOTE]
-> If you have more than one existing environments, you will need to select an existing environment to create the environment. The command will copy file contents of `config.<newEnv>.json` and `azure.parameters.<newEnv>.json` from the existing environment you selected to the new environment being created.
+> If you have more than one existing environments, you need to select an existing environment to create the same. The command will copy file contents of `config.<newEnv>.json` and `azure.parameters.<newEnv>.json` from the existing environment you selected to the new environment being created.
## Select target environment
-With environment concept introduced in Teams Toolkit, for all environment-related operations, you can select the target environment to perform the operations against. The toolkit will prompt and ask for a target environment when you have multiple remote environments as shown in the following image:
+You can select the target environment for all environment-related operations. The toolkit prompts and ask for a target environment when you have multiple remote environments as shown in the following image:
-![select env](./images/select-env.png)
## Project folder structure
-After creating the project, you can view the project folders and files in the Explorer area of Visual Studio Code. Besides the custom codes, some files are used by Teams Toolkit to maintain the config, state, and template of the app. Following list those files and outlines their relationship with multiple environments.
+After creating the project, you can view the project folders and files in the explorer area of Visual Studio Code. Besides the custom codes, some files are used by Teams Toolkit to maintain the config, state, and template of the app. The following list provides files and outlines their relationship with multiple environments.
-- `.fx/configs`: config files that user can customize for the Teams app.
+- `.fx/configs`: configure files that user can customize for the Teams app.
- `config.<envName>.json`: per-environment configuration file.
- - `azure.parameters.<envName>.json`: per-environment parameters file for Azure BICEP provision.
+ - `azure.parameters.<envName>.json`: per-environment parameters file for Azure bicep provision.
- `projectSettings.json`: global project settings , which apply to all environments. - `localSettings.json`: local debug configuration file. - `.fx/states`: provision result that is generated by the Toolkit.
After creating the project, you can view the project folders and files in the Ex
- `<env>.userdata`: per-environment sensitive user data for the provision output. - `templates` - `appPackage`: app manifest template files.
- - `azure`: BICEP template files.
+ - `azure`: Bicep template files.
## Customize the provision
-Teams Toolkit allows you to change the config files and template files to customize the resource provision in each environment.
+Teams Toolkit allows you to change the configuration files and template files to customize the resource provision in each environment.
-The table below lists the common scenarios supported for customized provision and where to customize:
+The following table lists the common scenarios supported for customized provision and where to customize:
-| Scenarios | Where to customize | How to customize |
+| Scenarios | Location| Description |
| | | |
-| Customize Azure Resource | <ul> <li>BICEP files under `templates/azure`.</li> <li>`.fx/azure.parameters.<envName>.json`.</li></ul> | Refer to [customize ARM parameters and templates](provision.md#customize-arm-parameters-and-templates) for more details. |
-| Reusing existing AAD app for Teams app | <ul> <li>`auth` section in`.fx/config.<envName>.json`.</li> </ul> | Refer to [use an existing AAD app for your Teams app](provision.md#use-an-existing-aad-app-for-your-teams-app) for more details. |
-| Reusing existing AAD app for bot | <ul> <li>`bot` section in`.fx/config.<envName>.json`.</li> </ul> | Refer to [use an existing AAD app for your bot](provision.md#use-an-existing-aad-app-for-your-bot) for more details. |
-| Skip adding user when provisioning SQL | <ul> <li>`skipAddingSqlUser` property in`.fx/config.<envName>.json`.</li> </ul> | Refer to [skip adding user for SQL database](provision.md#skip-adding-user-for-sql-database) for more details. |
-| Customize App Manifest | <ul> <li>`templates/manifest.remote.template.json`.</li> <li>`manifest` section in`.fx/config.<envName>.json`.</li> </ul> | Refer to [customize Teams App Manifest in Teams Toolkit](TeamsFx-manifest-customization.md) for more details. |
+| Customize Azure Resource | <ul> <li>Bicep files under `templates/azure`.</li> <li>`.fx/azure.parameters.<envName>.json`.</li></ul> | [Customize ARM parameters and templates](provision.md#customize-arm-parameters-and-templates). |
+| Reuse existing AAD app for Teams app | <ul> <li>`auth` section in`.fx/config.<envName>.json`.</li> </ul> | [Use an existing AAD app for your Teams app](provision.md#use-an-existing-aad-app-for-your-teams-app). |
+| Reuse existing AAD app for bot | <ul> <li>`bot` section in`.fx/config.<envName>.json`.</li> </ul> | [Use an existing AAD app for your bot](provision.md#use-an-existing-aad-app-for-your-bot). |
+| Skip adding user while provisioning SQL | <ul> <li>`skipAddingSqlUser` property in`.fx/config.<envName>.json`.</li> </ul> | [Skip adding user for SQL database](provision.md#skip-adding-user-for-sql-database). |
+| Customize app manifest | <ul> <li>`templates/manifest.remote.template.json`.</li> <li>`manifest` section in`.fx/config.<envName>.json`.</li> </ul> | [Customize Teams App Manifest in Teams Toolkit](TeamsFx-manifest-customization.md). |
## Scenarios
-### Scenario 1: customize Teams App name for different environment
+### Scenario 1: customize Teams app name for different environment
-In this example, you will learn how to set the Teams app name to `myapp(dev)` for the default environment `dev` and `myapp(staging)` for the staging environment `staging`.
+You can set the Teams app name to `myapp(dev)` for the default environment `dev` and `myapp(staging)` for the staging environment `staging`.
-Follow the steps for customization:
+Perform the following steps for customization:
-- Step 1: open config file `.fx/configs/config.dev.json`.-- Step 2: update the property of *manifest > appName > short* to `myapp(dev)`
+- 1. Open config file `.fx/configs/config.dev.json`.
+- 2. Update the property of *manifest > appName > short* to `myapp(dev)`
- Updates to `.fx/configs/config.dev.json`:
+ The updates to `.fx/configs/config.dev.json` are as follows:
```json {
Follow the steps for customization:
} ``` -- Step 3: create new environment named `staging` if it doesn't exist.-- Step 4: open config file `.fx/configs/config.staging.json`.-- Step 5: update the same property of step 2 to `myapp(staging)`.-- Step 6: run provision command against `dev` and `staging` environment to update the app name in remote environments. For how to run provision command with Teams Toolkit. For more information, see [this document](provision.md#provision-using-teams-toolkit).
+- 3. Create new environment and name it `staging` if it doesn't exist.
+- 4. Open config file `.fx/configs/config.staging.json`.
+- 5. Update the same property `myapp(staging)`.
+- 6. Run provision command on `dev` and `staging` environment to update the app name in remote environments. To run provision command with Teams Toolkit, see [provision](provision.md#provision-using-teams-toolkit).
### Scenario 2: customize Teams App description for different environment
-In this scenario, you will learn how to set different Teams App description for different environments:
+In this scenario, you will learn how to set different Teams app description for different environments:
- For the default environment `dev`, the description will be `my app description for dev`; - For the staging environment `staging`, the description will be `my app description for staging`;
-Steps to do the customization:
+Perform the following steps for customization:
-- Step 1: open config file `.fx/configs/config.dev.json`.-- Step 2: Add new property of *manifest > description > short* with value `my app description for dev`.
+- 1. Open config file `.fx/configs/config.dev.json`.
+- 2. Add new property of *manifest > description > short* with value `my app description for dev`.
- Updates to `.fx/configs/config.dev.json`
+ The updates to `.fx/configs/config.dev.json` are as follows:
```json {
Steps to do the customization:
} ``` -- Step 3: create a new environment named `staging` if it doesn't exist.-- Step 4: open config file `.fx/configs/config.staging.json`.-- Step 5: add the same property of step 2 to `my app description for staging`.-- Step 6: open Teams app manifest template for remote `templates/appPackage/manifest.remote.template.json`.-- Step 7: update the property `description > short` to use the **variable** defined in config files with mustache syntax `{{config.manifest.description.short}}`.
+- 3. Create a new environment and name it `staging` if it doesn't exist.
+- 4. Open config file `.fx/configs/config.staging.json`.
+- 5. Add the same property to `my app description for staging`.
+- 6. Open Teams app manifest template for remote `templates/appPackage/manifest.remote.template.json`.
+- 7. Update the property `description > short` to use the **variable** defined in configure files with mustache syntax `{{config.manifest.description.short}}`.
- Updates to `manifest.remote.template.json`:
+ The updates to `manifest.remote.template.json` are as follows:
```json {
Steps to do the customization:
"version": "1.0.0", ... "description": {
- "short": "{{config.manifest.description.short}}",
+ "short": "{{config.manifest.description.short}}",
... }, ... } ```-- Step 8: run provision command against `dev` and `staging` environment to update the app name in remote environments. For how to run provision command with Teams Toolkit, you can refer to [this document](provision.md#provision-using-teams-toolkit) for more details.
+- 8. Run provision command against `dev` and `staging` environment to update the app name in remote environments. To run provision command with Teams Toolkit, see [provision](provision.md#provision-using-teams-toolkit).
### Scenario 3: customize Teams App description for all environments
In this scenario, you will learn how to set the description of Teams app to `my
As the Teams app manifest template is shared across all environments, we can update the description value in it for our target: -- Step 1: open Teams app manifest template for remote `templates/appPackage/manifest.remote.template.json`.-- Step 2: update the property `description > short` with **hard-coded string** `my app description`.
+- 1. Open Teams app manifest template for remote `templates/appPackage/manifest.remote.template.json`.
+- 2. Update the property `description > short` with **hard-coded string** `my app description`.
- Updates to `manifest.remote.template.json`:
+ The updates to `manifest.remote.template.json` are as follows:
```json {
As the Teams app manifest template is shared across all environments, we can upd
... } -- Step 3: run provision command against **all** environment to update the app name in remote environments. For how to run provision command with Teams Toolkit, you can refer to [this document](provision.md#provision-using-teams-toolkit) for more details.
+- 3. Run provision command against **all** environment to update the app name in remote environments. To run provision command with Teams Toolkit, see [provision](provision.md#provision-using-teams-toolkit).
### Scenario 4: customize Azure resources for different environment
-You can customize Azure resources for each environment, for example specifying Azure Function name, by editing the environment corresponding `.fx/configs/azure.parameters.{env}.json` file.
+You can customize Azure resources for each environment, for example specify Azure Function name, by editing the environment corresponding to `.fx/configs/azure.parameters.{env}.json` file.
-For more information on BICEP template and parameter files, see [provision cloud resources](provision.md)
+For more information on Bicep template and parameter files, see [provision cloud resources](provision.md)
## See also
-> [!div class="nextstepaction"]
-> [Provision cloud resources](provision.md)
-
-> [!div class="nextstepaction"]
-> [Add more cloud resources](add-resource.md)
-
-> [!div class="nextstepaction"]
-> [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
+* [Provision cloud resources](provision.md)
+* [Add more cloud resources](add-resource.md)
+* [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
platform Accounts https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/accounts.md
Last updated 11/29/2021
# Prepare accounts to build Teams apps
-To develop a Teams app, at least one Microsoft 365 account with a valid subscription is needed. If you want to host your backend resources on Azure, an Azure account is also needed. Azure account is optional if your existing application is hosted on other cloud provider and you want to integrate the existing application to Teams platform.
+To develop Teams app, you require at least one Microsoft 365 account with valid subscription. If you want to host your backend resources on Azure, you need an Azure account. Azure account is optional if your existing application is hosted on other cloud provider and you want to integrate the existing application to Teams platform.
-## Microsoft 365 Account
+## Microsoft 365 account
-If you donΓÇÖt have an existing Microsoft 365 account with a valid subscription, you can create one by joining the [Microsoft 365 developer program](https://developer.microsoft.com/microsoft-365/dev-program). The Microsoft 365 Developer Program includes a Microsoft 365 E5 developer subscription that you can use to create your own sandbox and develop solutions independent of your production environment.
+If you donΓÇÖt have an existing Microsoft 365 account with a valid subscription, you can create one by joining the [Microsoft 365 developer program](https://developer.microsoft.com/microsoft-365/dev-program). The Microsoft 365 developer program includes a Microsoft 365 E5 developer subscription that you can use to create your own sandbox and develop solutions independent of your production environment.
## Azure account
-If you wish to host your app related resources or access resources **within Azure**, you must have an Azure subscription. You can [create a free account](https://azure.microsoft.com/free/) before you begin.
+If you want to host your app related resources or access resources within Azure, you must have an Azure subscription. You can [create a free account](https://azure.microsoft.com/free/) before you begin.
-## Join Microsoft 365 Developer program
+## Join Microsoft 365 developer program
If you don't have a Microsoft 365 account, you must sign up for a [Microsoft 365 developer program](https://developer.microsoft.com/microsoft-365/dev-program) subscription. The subscription is free for 90 days and continues to renew as long as you are using it for development activity. If you have a Visual Studio Enterprise or Professional subscription, both programs include a free Microsoft 365 [developer subscription](https://aka.ms/MyVisualStudioBenefits). It is active as long as your Visual Studio subscription is active. For more information, see [set up a Microsoft 365 developer subscription](https://developer.microsoft.com/microsoft-365/dev-program). 1. Go to the [Microsoft 365 developer program](https://developer.microsoft.com/microsoft-365/dev-program).
-2. Select **Join Now** and follow the onscreen instructions.
-3. In the welcome screen, select **Set up E5 subscription**.
+2. Select **Join Now**.
+3. Select **Set up E5 subscription**.
4. Set up your administrator account. After you finish, you should see the following screen: :::image type="content" source="./images/m365-developer-program.png" alt-text="Diagram that shows microsoft m365 program":::
-## Accounts for Microsoft 365 Developer Program
+## Accounts for Microsoft 365 developer program
You can sign up for the developer program by using one of the following account types: -- **Microsoft account**
+- **Microsoft account for personal use**
-You can create for personal use - Provides access to all consumer-oriented Microsoft products and cloud services, such as Outlook, Messenger, OneDrive, MSN, Xbox Live, or Microsoft 365. Signing up for an Outlook.com mailbox automatically creates a Microsoft account. After a Microsoft account is created, it can be used to access consumer-related Microsoft cloud services or Azure.
+ Provides access to all consumer oriented Microsoft products and cloud services, such as Outlook, Messenger, OneDrive, MSN, Xbox Live, or Microsoft 365. Signing up for an Outlook.com mailbox automatically creates a Microsoft account. After a Microsoft account is created, it can be used to access consumer-related Microsoft cloud services or Azure.
-- **Work account**
+- **Work account for business**
- Admin can issue for business use - Provides access to all small, medium, and enterprise business-level Microsoft cloud services, such as Azure, Microsoft Intune, or Microsoft 365. When you sign up to one of these services as an organization, a cloud-based directory is automatically provisioned in Azure Active Directory to represent your organization.
+ Provides access to all small, medium, and enterprise business-level Microsoft cloud services, such as Azure, Microsoft Intune, or Microsoft 365. When you sign up to one of these services as an organization, a cloud-based directory is automatically provisioned in Azure Active Directory to represent your organization.
- **Visual Studio ID**
-You can create for your Visual Studio Professional or Enterprise subscriptions - We recommend that you use this option to join the developer program from within the Visual Studio Gallery to get the full benefits as a Visual Studio subscriber.
+ You can create for your Visual Studio Professional or Enterprise subscriptions - We recommend that you use this option to join the developer program from within the Visual Studio Gallery to get the full benefits as a Visual Studio subscriber.
-## Teams customer app uploading (sideloading permission) check
+## Teams customer app upload or sideload permission
> [!IMPORTANT] > During development, you must load your app within your Teams without distributing it. This is known as **sideloading**.
-One of the ways to check if you have a Teams account, verify if you can sideload apps in Teams:
+The following list provides steps to check whether sideloading app permission is enabled. The two different ways are as follows:
-1. In the Teams client, select **Apps** in left bar.
-2. Select **Manage your apps**.
-3. Check whether you can see the option **Upload a custom app** as shown in the image:
+* **To use Visual studio code**
+ 1. Open **Visual Studio Code**.
+ 1. Select **Teams Toolkit** from left panel.
+ 1. Select **Accounts** and log in to your M365 account.
+ 1. Check whether you can see the option **Sideloading enabled** as shown in the image:
-If you cannot see **Upload a custom app** option, this indicates that you don't have sideloading permission. Without sideloading permission, you wonΓÇÖt be able to do any local/remote debugging. So itΓÇÖs very important to get the sideloading permission for your account before you do any debugging for your Teams app. If you are admin for your tenant, you can open the sideloading setting for your tenant/organization, while if you are not admin, please contact your tenant admin for the permission.
+ :::image type="content" source="../assets/images/teams-toolkit-v2/sideloading.png" alt-text="Enable sideloading":::
-## Enable custom app uploading (sideloading) for your organization
+* **To use Teams account**
+
+ 1. Open **Microsoft Teams**.
+ 2. Select **Apps** in left bar.
+ 3. Select **Publish an app**.
+
+ :::image type="content" source="../assets/images/teams-toolkit-v2/publish.png" alt-text="Publish an app":::
+
+ 4. Check whether you can see the option **Upload a custom app** as shown in the image:
+
+ :::image type="content" source="../assets/images/teams-toolkit-v2/upload.png" alt-text="Upload a custom app":::
+
+If you can't see **Upload a custom app** option, this indicates that you don't have permission for sideloading. Without sideloading permission, you wonΓÇÖt be able to do any local or remote debugging. So itΓÇÖs very important to get the sideloading permission for your account before you do any debugging for your Teams app. If you are admin for your tenant, you can open the sideloading setting for your tenant or organization. If you are not an admin, contact your tenant admin for the permission.
+
+## Enable custom app uploading for your organization
> [!IMPORTANT] > To turn on the custom app uploading or sideloading for your developer tenant, you must be the admin for your tenant.
If you cannot see **Upload a custom app** option, this indicates that you don't
2. Select **Show All** > **Teams**.
+ :::image type="content" source="../assets/images/teams-toolkit-v2/5.png" alt-text="show all":::
> [!NOTE] > It can take **up to 24 hours** for the **Teams** option to appear. You can [upload your custom app to a Teams environment](/microsoftteams/upload-custom-apps) for testing and validation in that time. 3. Navigate to **Teams apps** > **Setup Policies** > **Global**.
+ :::image type="content" source="../assets/images/teams-toolkit-v2/3.png" alt-text="set olicies":::
4. Toggle Upload custom apps to the **On** position.
+ :::image type="content" source="../assets/images/teams-toolkit-v2/4.png" alt-text="toggle":::
-5. Select **Save**. Your test tenant can permit custom app sideloading.
-
+5. Select **Save**.
> [!Note]
-> It can take up to 24 hours for the sideloading to be active. In the meantime, you can use **[upload for your tenant]** to test your app. To upload the .zip package file of the app, see [upload custom apps](/microsoftteams/teams-app-setup-policies).
+> It can take up to 24 hours for the sideloading to be active. In the meantime, you can use **upload for your tenant** to test your app. To upload the .zip package file of the app, see [upload custom apps](/microsoftteams/teams-app-setup-policies).
For more information, see [manage custom app policies and settings in Teams](/microsoftteams/teams-custom-app-policies-and-settings) and [manage app setup policies in Teams](/microsoftteams/teams-app-setup-policies). ## See also
-> [!div class="nextstepaction"]
-> [Create new Teams project](create-new-project.md)
-
-> [!div class="nextstepaction"]
-> [Provision cloud resources](provision.md)
+* [Create new Teams project](create-new-project.md)
+* [Provision cloud resources](provision.md)
platform Add Capability https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/add-capability.md
Last updated 11/29/2021
# Add capabilities to your Teams apps
-You can start to create a Teams app with one of the Teams app capabilities. During app development, you can use Teams Toolkit to flexibly add more capabilities to your Teams app. The following table describes the Teams app capabilities:
+You can create a new Teams app with one of the Teams app capabilities. During app development, you can use Teams Toolkit to add more capabilities to your Teams app. The following table lists the Teams app capabilities:
|**Capability**|**Description**| |--|-|
You can start to create a Teams app with one of the Teams app capabilities. Duri
* [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+. > [!TIP]
-> You should already have a Teams app project opened in VS code.
+> Ensure you have Teams app project opened in VS code.
## Add capabilities using Teams Toolkit > [!IMPORTANT] > You need to perform provision for each environment after you successfully add capabilities to your Teams app.
-1. Select **Teams Toolkit** from left panel:
-
- ![Activate Teams Toolkit](./images/activate-teams-toolkit.png)
-
+1. Open **Visual Studio Code**.
+1. Select **Teams Toolkit** from left panel.
1. Select **Add capabilities**:
- ![Add capabilities](./images/add-capabilities.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/manual/add capabilities.png" alt-text="capabilities":::
- You can also open the command palette and enter **Teams: Add Capabilities**:
+ You can also open the command palette and enter **Teams: Add Capabilities**:
- > [!NOTE]
- > This is an equivalent to trigger from Tree View.
-
- ![Alternate add capabilities](./images/alternate-capabilities.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/manual/tree view capabilities.png" alt-text="Alternate capabilities":::
-1. From the pop-up, select the capabilities to include into your project:
+1. From the pop-up, select the capabilities to include in your project:
- ![Select capabilities](./images/select-capabilities.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/select capabilities.png" alt-text="select":::
1. Select **OK**. The selected capabilities are succesfully added to your project. The Teams Toolkit generate source code for newly added capabilities.
-## Add capabilities Using TeamsFx CLI in Command Window
+## Add capabilities using TeamsFx CLI in command window
1. Change directory to your **project directory**. 1. Execute the following command to add different capabilities to your project: |Capability and Scenario| Command| |--|-|
- |To add a tab|`teamsfx capability add tab`|
- |To add a bot|`teamsfx capability add bot`|
- |To add a messaging extension|`teamsfx capability add messaging-extension`|
+ |To add tab|`teamsfx capability add tab`|
+ |To add bot|`teamsfx capability add bot`|
+ |To add messaging extension|`teamsfx capability add messaging-extension`|
## Supported capabilities matrix
-Apart from the capabilities your Teams app already have, you can choose to add different capabilities to your Teams app.The following table gives various supported Teams app capabilities:
+Apart from the capabilities your Teams app already have, you can choose to add different capabilities to your Teams app. The following table provides the different Teams app capabilities:
-|Existing capabilities|Other capabilities can be added|
+|Existing capabilities|Other supported capabilities can be added|
|--|--| |Tabs with SPFx|None| |Tabs with Azure|Bots and messaging extensions|
Apart from the capabilities your Teams app already have, you can choose to add d
|Tabs and messaging extensions|None| |Tabs, bots, and messaging extensions|None|
-## What happens when you add capabilities
+## Add capabilities
-After adding bot and messaging extension, the following changes in your project are:
+After adding bot and messaging extension, the changes in your project are as follows:
-- A bot template code is added into a subfolder with path `yourProjectFolder/bot`. This includes a "hello world" bot application template into your project.-- `launch.json` and `task.json` under `.vscode` folder are updated. This includes necessary scripts for Visual Studio Code is executed when you want to debug your application locally. -- `manifest.remote.template.json` and `manifest.local.template.json` file under `templates/appPackage` folder are updated. This includes bot related information in the manifest file that represents your application in the Teams Platform. The change includes:
+- A bot template code is added into a subfolder with path `yourProjectFolder/bot`. This includes a **hello world** bot application template into your project.
+- `launch.json` and `task.json` under `.vscode` folder are updated, which includes necessary scripts for Visual Studio Code, and is executed when you want to debug your application locally.
+- `manifest.remote.template.json` and `manifest.local.template.json` file under `templates/appPackage` folder are updated, which includes bot related information in the manifest file that represents your application in the Teams Platform. The changes are as follows:
- The ID of your bot. - The scopes of your bot. - The commands that hello world bot application can respond to.-- Files under `templates/azure/teamsfx` will be updated, and templates/azure/provision/xxx.bicep file will be regenerated.-- File under `.fx/config` are regenerated. This ensures your project set with right configurations for newly added capability.
+- The files under `templates/azure/teamsfx` will be updated, and `templates/azure/provision/xxx`.bicep file will be regenerated.
+- The files under `.fx/config` are regenerated, which ensures your project is set with right configurations for newly added capability.
-After added tab, the following changes in your project are:
+After adding tab, the changes in your project are as follows:
-- A frontend tab template code is added into a subfolder with path `yourProjectFolder/tab`. This includes a "hello world" tab application template into your project.-- `launch.json` and `task.json` under `.vscode` folder are updated. This includes necessary scripts for Visual Studio Code is executed when you want to debug your application locally. -- `manifest.remote.template.json` and `manifest.local.template.json` file under `templates/appPackage` folder are updated. This includes tab-related information in the manifest file that represents your application in the Teams Platform, the changes include:
+- A frontend tab template code is added into a subfolder with path `yourProjectFolder/tab`, which includes a **hello world** tab application template into your project.
+- `launch.json` and `task.json` under `.vscode` folder are updated, which includes necessary scripts for Visual Studio Code, and is executed when you want to debug your application locally.
+- `manifest.remote.template.json` and `manifest.local.template.json` file under `templates/appPackage` folder are updated, which includes tab-related information in the manifest file that represents your application in the Teams Platform, the changes are as follows:
- The configurable and static tabs. - The scopes of the tabs.-- Files under `templates/azure/teamsfx` will be updated, and templates/azure/provision/xxx.bicep file will be regenerated.-- File under `.fx/config` are regenerated. This ensures your project set with right configurations for newly added capability.
+- The files under `templates/azure/teamsfx` will be updated, and `templates/azure/provision/xxx`.bicep file will be regenerated.
+- The file under `.fx/config` are regenerated, which ensures your project is set with right configurations for newly added capability.
## Limitations
-Currently, there are limitations with TeamsFx when adding more capabilities. The limitations are as follows:
+The limitations with TeamsFx while adding more capabilities are as follows:
-- Each project capability more than once-- Any capability if you start with a Tab application with SPFx-- More bot capabilities if your project contains messaging extension-- More messaging extension if your project contains a bot.
+- You can't add project capability for more than one instance.
+- You can't add bot capabilities if your project contains messaging extension.
+- You can't add messaging extension if your project contains a bot.
> [!NOTE]
-> If you want to include both bot and messaging extension capabilities, then select them at the same time. You can add them either when you create a new project or a tab application.
+> If you want to include both bot and messaging extension capabilities, then select them at the same time. You can only add them either when you create a new project or a tab application.
## See also
-> [!div class="nextstepaction"]
-> [Provision cloud resources](provision.md)
-
-> [!div class="nextstepaction"]
-> [Create new Teams project](create-new-project.md)
+* [Provision cloud resources](provision.md)
+* [Create new Teams project](create-new-project.md)
platform Add Resource https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/add-resource.md
TeamsFx helps to provision cloud resources for your application hosting. You can
* [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+. > [!TIP]
-> You should already have a Teams app project.
+> Ensure you have Teams app project in VS Code.
## Add cloud resources using Teams Toolkit
TeamsFx helps to provision cloud resources for your application hosting. You can
> You need to provision each environment after you add a resource. 1. Open **Visual Studio Code**.
-1. Select **Teams Toolkit** from left panel:
-
- ![Activate Teams Toolkit](./images/activate-teams-toolkit.png)
-
+1. Select **Teams Toolkit** from left pane.
1. In the Teams Toolkit side bar panel, select **Add cloud resources**:
- ![Add cloud resources](./images/add-cloud-resources.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/manual/add cloudresources.png" alt-text="Add resources":::
- You can also open the command palette and enter **Teams: Add cloud resources**:
-
- > [!NOTE]
- > Follow the same process as itΓÇÖs triggered from Tree View:
+ You can also open the command palette and enter **Teams: Add cloud resources**:
- ![Alternate cloud resources](./images/alternate-cloud-resources.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/manual/addcloud.png" alt-text="add cloud resources":::
-1. From the pop-up, select any cloud resources you want to add to your Teams app project:
+1. From the pop-up, select the cloud resources you want to add to your Teams app project:
- ![Select cloud resources](./images/select-cloud-resources.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/manual/addresources.png" alt-text="add":::
1. Select **OK**.
-## Add cloud resources using TeamsFx CLI in Command Window
+The selected resources are succesfully added to your project.
-1. Change directory to your **project directory**.
-1. Execute command to add different capabilities.
+## Add cloud resources using TeamsFx CLI in command window
-The following table describes cloud resources and the corresponding commands to add them:
+1. Change directory to your **project directory**.
+1. Execute the following command to add different resources in your project:
-|Cloud Resources|Command|
+|Cloud Resource|Command|
||-| | Azure function|`teamsfx resource add azure-function --function-name your-func-name`| | Azure SQL database|`teamsfx resource add --function-name your-func-name`| | Azure API management|`teamsfx resource add azure-apim`|
+| Azure Key Vault|`teamsfx resource add azure-keyvault`|
-## What cloud resources can be added
+## Types of cloud resources
-TeamsFx provides seamless integrations with Azure services that are common for the following application scenarios:
+TeamsFx integrates with Azure services for the following scenarios:
- [Azure functions](/azure/azure-functions/functions-overview): A serverless solution to meet your on-demand requirements, such as creating web APIs for your Teams applications backend.-- [Azure SQL database](/azure/azure-sql/database/sql-database-paas-overview): A fully managed platform as a service (PaaS) database engine to serve as your Teams applications data store.-- [Azure API management](/azure/azure-sql/database/sql-database-paas-overview): An API gateway that can be used to administer APIs created for Teams applications and publish them to consume on other applications, such as Power Apps.
+- [Azure SQL database](/azure/azure-sql/database/sql-database-paas-overview): A platform as a service (PaaS) database engine to serve as your Teams applications data store.
+- [Azure API management](/azure/azure-sql/database/sql-database-paas-overview): An API gateway that can be used to administer APIs created for Teams applications and publish them to consume on other applications, such as Power apps.
+- [Azure Key Vault](/azure/key-vault/general/overview): Safeguard cryptographic keys and other secrets used by cloud apps and services.
-## What happens when you add resources
+## Add Cloud resources
-The following changes will happen to your project when you add any resources:
+After adding any resource, the changes in your project are as follows:
- New parameters may be added to azure.parameter.{env}.json to provide required information for provision.-- New content are appended to ARM template under `templates/azure` folder (except files under `templates/azure/teamsfx` folder) to create the added Azure resources.-- Files under `templates/azure/teamsfx` folder are regenerated to ensure TeamsFx required configuration are up-to-date for added Azure resources.
+- New content are appended to ARM template under `templates/azure` folder except the files under `templates/azure/teamsfx` folder to create the added Azure resources.
+- The files under `templates/azure/teamsfx` folder are regenerated to ensure TeamsFx required configuration are up to date for added Azure resources.
- `.fx/projectSettings.json` is updated to track the resources present in your project.
-In the meanwhile, there're some additional changes for each kind of resource:
+After adding resouces, the additional changes in your project are as follows:
-|Resources Added|What changed|Why these changes are made|
+|Resources|Changes|Description|
|||--|
-|Azure Functions|An Azure Functions template code is added into a subfolder with path `yourProjectFolder/api`</br></br>`launch.json` and `task.json` updated under `.vscode` folder.| Include a hello world http trigger template into your project.</br></br> To include necessary scripts for Visual Studio Code executed when you want to debug your application locally.|
-|Azure API Management|An Open API Specification file added into a subfolder with path `yourProjectFolder/openapi`|This is the API specification file defines your API after publishing.|
+|Azure functions|An Azure functions template code is added into a subfolder with path `yourProjectFolder/api`</br></br>`launch.json` and `task.json` updated under `.vscode` folder.| Includes a hello world http trigger template into your project.</br></br> Includes necessary scripts for Visual Studio Code to be executed when you want to debug your application locally.|
+|Azure API management|An open API specification file added into a subfolder with path `yourProjectFolder/openapi`|Defines your API after publishing, it is the API specification file .|
## Limitations -- You can only add one Function App / Azure SQL Database / APIM Service to your project.-- You cannot add resources if your project does not contain tab app.
+- You can't add cloud resource for more than one instance.
+- You can't add resources if your project doesn't contain tab app.
## See also
-> [!div class="nextstepaction"]
-> [Provision cloud resources](provision.md)
+[Provision cloud resources](provision.md)
platform Create New Project https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/create-new-project.md
Last updated 11/29/2021
# Create new Teams project using Teams Toolkit
-You can either **Create new project** or **Create from samples**, to use the Teams Toolkit for Teams app building.
+You can create new Teams project using Teams Toolkit either by using **Create new project** or **Create from samples**.
## Create new project
-The following steps guide to create a new Teams app project using Teams Toolkit:
+The following guides helps you to create a new Teams app project using Teams Toolkit:
- [Create new Teams Tab app (React)](/microsoftteams/platform/sbs-gs-javascript?tabs=vscode%2Cvsc%2Cviscode%2Cvcode&tutorial-step=2) - [Create new Teams Bot app](/microsoftteams/platform/sbs-gs-spfx?tabs=vscode%2Cviscode&branch)
The following steps guide to create a new Teams app project using Teams Toolkit:
## Create from samples
-If you don't want to start with "hello world" application, you can try to explore **sample gallery** and find something you are interested to start your own work with. The following steps help you to create apps from samples:
+ You can create new project by exploring **sample gallery**. Select the required sample to create apps. The following steps guide you to create apps from samples:
1. Open **Teams Toolkit** from Visual Studio Code.- 1. Select **DEVELOPMENT** section in Tree View.
+ 1. Select **View samples**. The sample gallery appears as shown in the following image:
+
+ :::image type="content" source="../assets/images/teams-toolkit-v2/manual/view samples.png" alt-text="samples":::
- 1. Select **View samples**. The sample gallery appears.
-
-In the sample gallery, you can explore samples and download as shown in following image:
-
-![Teams Toolkit view samples](./images/teams-toolkit-view-samples.png)
-
-You can download and either run apps locally or remotely to preview in Teams web client. Follow the instructions of each sample or browse the source code of samples by selecting **View on GitHub**. Then,you can open source repo for Samples.
+You can explore and download samples and either run apps locally or remotely to preview in Teams web client. Follow the instructions of each sample or browse the source code of samples by selecting **View on GitHub** to access open source repo for samples.
## See also
-> [!div class="nextstepaction"]
-> [Provision cloud resources](provision.md)
-
-> [!div class="nextstepaction"]
-> [Deploy Teams app to the cloud](deploy.md)
-
-> [!div class="nextstepaction"]
-> [Publish your Teams app](TeamsFx-collaboration.md)
-
-> [!div class="nextstepaction"]
-> [Manage multiple environments](TeamsFx-multi-env.md)
-
-> [!div class="nextstepaction"]
-> [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
+* [Provision cloud resources](provision.md)
+* [Deploy Teams app to the cloud](deploy.md)
+* [Publish your Teams app](TeamsFx-collaboration.md)
+* [Manage multiple environments](TeamsFx-multi-env.md)
+* [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
platform Deploy https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/deploy.md
Last updated 11/29/2021
Teams Toolkit helps you to deploy or upload the frontend and backend code in your application to your provisioned cloud resources in Azure.
-* The Tab, such as frontend applications are deployed to Azure storage and configured for static web hosting or a SharePoint site.
-* The backend APIs are deployed to Azure Functions.
-* The Bot or Messaging Extension is deployed to Azure App Service.
+* The tab, such as frontend applications are deployed to Azure storage and configured for static web hosting or a sharepoint site.
+* The backend APIs are deployed to Azure functions.
+* The bot or messaging extension is deployed to Azure app service.
## Prerequisite * [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+.
-> [!TIP]
-> You should already have a Teams app project opened in VS code.
- > [!NOTE]
-> Before you deploy project code to cloud, perform the [provision cloud resources](provision.md) steps first.
-
+> * Ensure you have Teams app project opened in VS code.
+> * Before you deploy project code to cloud, [provision the cloud resources](provision.md).
## Deploy Teams apps using Teams Toolkit
-In Get started tutorials, there are step-by-step guides of how to deploy using Teams Toolkit. You can use the following to deploy your Teams app:
-
+The get started guides help you to deploy using Teams Toolkit. You can use the following to deploy your Teams app:
* [Deploy your app to Azure](/microsoftteams/platform/sbs-gs-javascript?tabs=vscode%2Cvsc%2Cviscode%2Cvcode&tutorial-step=8&branch) * [Deploy your app to SharePoint](/microsoftteams/platform/sbs-gs-spfx?tabs=vscode%2Cviscode&tutorial-step=4&branch)
-## Details on Teams app workloads
+## Details on Teams app workload
-| Teams App Workloads| Source Code | Build Artifacts| Target Resources |
+| Teams app workload | Source code | Build artifact| Target resource |
|-|-|||
-|Tabs with React </br> The frontend workload| `yourProjectFolder/tabs`| `tabs/build` |Azure Storage |
+|Tabs with React </br> The frontend workload| `yourProjectFolder/tabs`| `tabs/build` |Azure storage |
|Tabs with SharePoint </br> The frontend workload | `yourProjectFolder/SPFx`| `SPFx/sharepoint/solution` |SharePoint app catalog |
-|APIs on Azure Functions </br> The backend workload | `yourProjectFolder/api`| N/A |Azure Functions |
-|Bots and messaging extensions </br> The backend workload | `yourProjectFolder/bot` | N/A | Azure App Service |
+|APIs on Azure functions </br> The backend workload | `yourProjectFolder/api`| Not applicable |Azure functions |
+|Bots and messaging extensions </br> The backend workload | `yourProjectFolder/bot` | Not applicable | Azure app service |
> [!NOTE]
-> When you include Azure API management resource in your project and trigger deploy. You can publish your APIs in Azure Functions to Azure API Management Service.
+> When you include Azure API management resource in your project and trigger deploy. You can publish your APIs in Azure functions to Azure API management service.
## See also
-> [!div class="nextstepaction"]
-> [Add more cloud resources](add-resource.md)
-
-> [!div class="nextstepaction"]
-> [Add more Teams app capabilities](add-capability.md)
-
-> [!div class="nextstepaction"]
-> [Deploy project code with CI/CD pipelines](use-CICD-template.md)
-
-> [!div class="nextstepaction"]
-> [Manage multiple environments](TeamsFx-multi-env.md)
-
-> [!div class="nextstepaction"]
-> [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
+* [Add more cloud resources](add-resource.md)
+* [Add more Teams app capabilities](add-capability.md)
+* [Deploy project code with CI/CD pipelines](use-CICD-template.md)
+* [Manage multiple environments](TeamsFx-multi-env.md)
+* [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
platform Provision https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/provision.md
Last updated 11/29/2021
# Use Teams Toolkit to provision cloud resources
-TeamsFx provides seamless integration with Azure and Microsoft 365 cloud that allows you to place your application in Azure with a single command. TeamsFx integrates with Azure Resource Manager that enables you to declaratively provision Azure resources your application needs using infrastructure as code approach.
+TeamsFx integrates with Azure and Microsoft 365 cloud, which allows you to place your application in Azure with a single command. TeamsFx integrates with Azure Resource Manager that enables you to provision Azure resources, which your application needs for code approach.
## Prerequisites * Account prerequisites
+ To provision cloud resources, you must have the following accounts:
- To provision cloud resources, you must have the following accounts with proper permissions. For more information, see [prepare accounts to build Teams app](accounts.md).
- * Microsoft 365
+ * Microsoft 365 account with valid subscription
* Azure with valid subscription
+ For more information, see [how to prepare accounts for building Teams app](accounts.md).
* [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+. > [!TIP]
-> You should already have a Teams app project opened in VS code.
+> Ensure you have Teams app project opened in VS code.
## Provision using Teams Toolkit
When you trigger provision command in Teams Toolkit or TeamsFx CLI, you can get
* Teams app registration under your Microsoft 365 tenant's Teams platform * Azure resources under your selected Azure subscription
-When you create a new project, you get all the Azure resources to be created. The generated ARM template defines all the Azure resources and helps to create required Azure resources during provision. When you [adds new capability/resource](./add-resource.md) to an existing project, the updated ARM template reflects the latest change.
+When you create a new project, you can use all the Azure resources. The ARM template defines all the Azure resources and helps to create required Azure resources during provision. When you [add new capability resource](./add-resource.md) to an existing project, the updated ARM template reflects the latest change.
> [!NOTE]
-> Azure services incur costs in your subscription, you can refer to [pricing calculator](https://azure.microsoft.com/pricing/calculator/) to understand an estimate.
+> Azure services incur costs in your subscription, for more information on cost estimation, see [the pricing calculator](https://azure.microsoft.com/pricing/calculator/).
### Resource creation for Teams Tab application
-|Resources|Purpose of this resource| Notes |
+|Resource|Purpose|Description |
|-|--|--|
-| Azure Storage | Host your tab app | Enables static web app feature to host your tab app |
-| App Service Plan for Simple Auth | Host the web app of Simple Auth | |
-| Web App for Simple Auth | Host simple auth server that helps you gain access to other services in your single page application | Adds user assigned identity to make it easy to access other Azure resources |
-| User Assigned Identity | Authenticate Azure service-to-service requests | Shared across different capabilities and resources |
+| Azure storage | Host your tab app | Enables static web app feature to host your tab app |
+| App service plan for simple auth | Host the web app of Simple Auth |Not applicable |
+| Web app for simple auth | Host simple auth server to gain access to other services in your single page application | Adds user assigned identity to access other Azure resources |
+| User assigned identity | Authenticate Azure service-to-service requests | Shared across different capabilities and resources |
-### Resources created for Teams Bot or Messaging Extension application
+### Resource creation for Teams bot or messaging extension application
-|Resources|Purpose of this resource| Notes |
+|Resource|Purpose| Description |
|-|--|--|
-| Azure Bot Service | Registers your app as a bot with the Bot Framework | Connects the bot to Teams |
-| App Service Plan for Bot | Host the web app of Bot | |
-| Web App for Bot | Host your bot app | Adds user assigned identity to make it easy to access other Azure resources. <br /> Adds app settings required by [TeamsFx SDK](https://www.npmjs.com/package/@microsoft/teamsfx) |
-| User Assigned Identity | Authenticate Azure service-to-service requests | Shared across different capabilities and resources |
+| Azure bot service | Registers your app as a bot with the bot framework | Connects bot to Teams |
+| App service plan for bot | Host the web app of bot |Not applicable |
+| Web app for bot | Host your bot app | Adds user assigned identity to access other Azure resources. <br /> Adds app settings required by [TeamsFx SDK](https://www.npmjs.com/package/@microsoft/teamsfx) |
+| User assigned identity | Authenticate Azure service-to-service requests | Shared across different capabilities and resources |
-### Resources created when including Azure Functions in the project
+### Resource creation for Azure Functions in the project
-|Resources|Purpose of this resource| Notes |
+|Resource|Purpose| Description|
|-|--|--|
-| App Service Plan for Function App | Host the Function App | |
-| Function App | Host your Azure Functions APIs | Adds user assigned identity to make it easy to access other Azure resources. <br /> Adds CORS rule to allow requests from your tab app <br /> Adds authentication setting that only allows requests from your Teams app. <br /> Adds app settings required by [TeamsFx SDK](https://www.npmjs.com/package/@microsoft/teamsfx) |
-| Azure Storage for Function App | Required when creating Function App | |
-| User Assigned Identity | Authenticate Azure service-to-service requests | Shared across different capabilities and resources |
+| App service plan for function app | Host the function app |Not applicable |
+| Function app | Host your Azure functions APIs | Adds user assigned identity to access other Azure resources. <br /> Adds Cross-origin resource sharing (CORS) rule to allow requests from your tab app <br /> Adds authentication setting that only allows requests from your Teams app. <br /> Adds app settings required by [TeamsFx SDK](https://www.npmjs.com/package/@microsoft/teamsfx) |
+| Azure storage for function app | Required to create function app |Not applicable|
+| User assigned identity | Authenticate Azure service-to-service requests | Shared across different capabilities and resources |
-### Resources created when including Azure SQL in the project
+### Resource creation for Azure SQL in the project
-|Resources|Purpose of this resource| Notes |
+|Resource|Purpose | Description |
|-|--|--|
-| Azure SQL Server | Host the Azure SQL Database instance | Allows all Azure services to access the server |
-| Azure SQL Database | Store data for your app | Grants user assigned identity read/write permission to the database |
-| User Assigned Identity | Authenticate Azure service-to-service requests | Shared across different capabilities and resources |
+| Azure SQL server | Host the Azure SQL database instance | Allows all Azure services to access the server |
+| Azure SQL database | Store data for your app | Grants user assigned identity, read or write permission to the database |
+| User assigned identity | Authenticate Azure service-to-service requests | Shared across different capabilities and resources |
-### Resources created when including Azure API Management in the project
+### Resource creation for Azure API Management in the project
+
+|Resource|Purpose|
+|-|--|
+| Azure active directory application for API management service | Allows Microsoft Power Platform access APIs managed by API management service |
+| API management service | Manage your APIs hosted in function app |
+| API management product | Group your APIs, define terms of use and runtime policies |
+| API management OAuth server | Enables Microsoft Power Platform to access your APIs hosted in function app |
+| User assigned identity | Authenticate Azure service-to-service requests |
+
+### Resources created when including Azure Key Vault in the project
|Resources|Purpose of this resource| |-|--|
-| Azure Active Directory application for API Management service | Allows Microsoft Power Platform access APIs managed by API Management service |
-| API Management Service | Manage your APIs hosted in Function App |
-| API Management Product | Group your APIs, define terms of use and runtime policies |
-| API Management OAuth Server | Enables Microsoft Power Platform to access your APIs hosted in Function App |
+| Azure Key Vault Service | Manage secrets (e.g. AAD app client secret) used by other Azure Services |
| User Assigned Identity | Authenticate Azure service-to-service requests | ## Customize resource provision
-Teams Toolkit enables you to use an infrastructure as code approach to define what Azure resources you want to provision, and how you want to configure them. The tooling uses ARM template to define Azure resources. The ARM template is a set of bicep files that defines the infrastructure and configuration for your project. You can customize Azure resources created by modifying the ARM template. For more information, see [bicep document](/azure/azure-resource-manager/bicep.md). Provision with ARM involves changing following two sets of files, parameters and templates:
+Teams Toolkit enables you to use an infrastructure as code approach to define what Azure resources you want to provision, and how you want to configure. The tool uses ARM template to define Azure resources. The ARM template is a set of bicep files that defines the infrastructure and configuration for your project. You can customize Azure resources by modifying the ARM template. For more information, see [bicep document](/azure/azure-resource-manager/bicep.md).
-* ARM parameter files (`azure.parameters.{your_env_name}.json`) are located at `.fx/configs` folder, for passing parameters to templates.
+Provision with ARM involves changing the following sets of files, parameters and templates:
+
+* ARM parameter files (`azure.parameters.{your_env_name}.json`) located at `.fx/configs` folder, for passing parameters to templates.
* ARM template files located at `templates/azure`, this folder contains following files:
-| File | What does it do | Allow customization |
+| File | Function | Allow customization |
| | | | | main.bicep | Provide entry point for Azure resource provision | Yes |
-| provision.bicep | Create and config Azure resources | Yes |
+| provision.bicep | Create and configure Azure resources | Yes |
| config.bicep | Add TeamsFx required configurations to Azure resources | Yes |
-| provision/xxx.bicep | create and config each Azure resource consumed by `provision.bicep` | Yes |
+| provision/xxx.bicep | Create and configure each Azure resource consumed by `provision.bicep` | Yes |
| teamsfx/xxx.bicep | Add TeamsFx required configurations to each Azure resource consumed by `config.bicep`| No | > [!NOTE]
-> when you add resources or capabilities to your project, `teamsfx/xxx.bicep` will be regenerated. That's why it's marked as not customizable. If you really have requirement to modify these bicep files, we recommend to use Git to track your changes to `teamsfx/xxx.bicep` files so you won't lose your changes while adding resources or capabilities.
+> When you add resources or capabilities to your project, `teamsfx/xxx.bicep` will be regenerated, you can't customize the same. To modify the bicep files, you can use Git to track your changes to `teamsfx/xxx.bicep` files, which helps you to not lose changes while adding resources or capabilities.
### Customize ARM parameters and templates
You can customize Azure resources by customizing the parameter files and customi
#### Customize ARM template parameter files
-The toolkit provides a set of predefined parameters for you to customize the Azure resources. The parameter files are located at `.fx/configs/azure.parameters.{env}.json` and all the available parameters are defined in the `provisionParameters` property. It's preferred to customize the parameter files if the predefined parameters satisfies your requirement.
+The toolkit provides a set of predefined parameters for you to customize the Azure resources. The parameter files are located at `.fx/configs/azure.parameters.{env}.json` and all the available parameters are defined in the `provisionParameters` property. It's recommended to customize the parameter files if the predefined parameters satisfies your requirement.
-Here's a list of predefined parameters available:
+The following table provides a list of available predefined parameters:
-| Parameter name | Default Value | What can be customized by the parameter | Value constraints |
+| Parameter name | Default value | What can be customized by the parameter | Value constraints |
| | | | | | resourceBaseName | Auto-generated for each environment | Default name for all resources | 2-20 lowercase letters and numbers |
-| simpleAuthServerFarmsName | ${resourceBaseName}simpleAuth | Name of Simple Auth App Service Plan | 1-40 alphanumerics and hyphens |
-| simpleAuthWebAppName | ${resourceBaseName}simpleAuth | Name of Simple Auth Web App | 2-60 alphanumerics and hyphens <br /> Cannot start or end with hyphen |
-| simpleAuthSku | F1 | SKU of Simple Auth App Service Plan | |
-| frontendHostingStorageName | ${resourceBaseName}tab | Name of Frontend Hosting Storage Account | 3-24 lowercase letters and numbers |
-| frontendHostingStorageSku | Standard_LRS | SKU of Frontend Hosting Storage Account | Please refer this [page](/azure/templates/microsoft.storage/storageaccounts?tabs=bicep&branch) for available SKUs |
-| functionServerfarmsName | ${resourceBaseName}api | Name of Function App's App Service Plan | 1-40 alphanumerics and hyphens |
-| functionServerfarmsSku | Y1 | SKU of FUnction App's App Service Plan |
-| functionAppName | ${resourceBaseName}api | Name of Function App | 2-60 alphanumerics and hyphens <br /> Cannot start or end with hyphen |
-| functionStorageName | ${resourceBaseName}api | Name of Function App's Storage Account | 3-24 lowercase letters and numbers |
-| functionStorageSku | Standard_LRS | SKU of Function App's Storage Account | Please refer this [page](/azure/templates/microsoft.storage/storageaccounts?tabs=bicep&branch=pr-en-us-4713)for available SKUs |
-| botServiceName | ${resourceBaseName} | Name of Azure Bot service | 2-64 alphanumerics, underscores, periods, and hyphens <br /> Start with alphanumeric |
-| botServiceSku | F0 | SKU of Azure Bot service | Please refer this [page](/azure/templates/microsoft.botservice/2021-05-01-preview/botservices?tabs=bicep&branch) for available SKUs |
+| simpleAuthServerFarmsName | ${resourceBaseName}simpleAuth | Name of simple auth app service plan | 1-40 alphanumerics and hyphens |
+| simpleAuthWebAppName | ${resourceBaseName}simpleAuth | Name of simple auth web app | 2-60 alphanumerics and hyphens <br /> Cannot start or end with hyphen |
+| simpleAuthSku | F1 | SKU of simple auth app service plan | Not applicable |
+| frontendHostingStorageName | ${resourceBaseName}tab | Name of frontend hosting storage account | 3-24 lowercase letters and numbers |
+| frontendHostingStorageSku | Standard_LRS | SKU of frontend hosting storage account |[Available SKUs](/azure/templates/microsoft.storage/storageaccounts?tabs=bicep&branch)|
+| functionServerfarmsName | ${resourceBaseName}api | Name of function apps service plan | 1-40 alphanumerics and hyphens |
+| functionServerfarmsSku | Y1 | SKU of function apps service plan | Not applicable|
+| functionAppName | ${resourceBaseName}api | Name of function app | 2-60 alphanumerics and hyphens <br /> Cannot start or end with hyphen |
+| functionStorageName | ${resourceBaseName}api | Name of function app's storage account | 3-24 lowercase letters and numbers |
+| functionStorageSku | Standard_LRS | SKU of function app's storage account | [Available SKUs](/azure/templates/microsoft.storage/storageaccounts?tabs=bicep&branch=pr-en-us-4713) |
+| botServiceName | ${resourceBaseName} | Name of Azure bot service | 2-64 alphanumerics, underscores, periods, and hyphens <br /> Start with alphanumeric |
+| botServiceSku | F0 | SKU of Azure bot service | [Available SKUs](/azure/templates/microsoft.botservice/2021-05-01-preview/botservices?tabs=bicep&branch) |
| botDisplayName | ${resourceBaseName} | Display name of your bot | 1-42 characters |
-| botServerfarmsName | ${resourceBaseName}bot | Name of Bot's App Service Plan | 1-40 alphanumerics and hyphens |
-| botWebAppName | ${resourceBaseName}bot | Name of Bot's Web App | 2-60 alphanumerics and hyphens <br /> Cannot start or end with hyphen |
-| botWebAppSKU | F1 | SKU of Bot App Service Plan | |
+| botServerfarmsName | ${resourceBaseName}bot | Name of bot's app service plan | 1-40 alphanumerics and hyphens |
+| botWebAppName | ${resourceBaseName}bot | Name of bot's web app | 2-60 alphanumerics and hyphens <br /> Cannot start or end with hyphen |
+| botWebAppSKU | F1 | SKU of Bot App Service Plan | Not applicable |
| userAssignedIdentityName | ${resourceBaseName} | Name of user assigned identity | 3-128 alphanumerics, hyphens, and underscores <br /> Start with letter or number |
-| sqlServerName | ${resourceBaseName} | Name of Azure SQL Server | 1-63 lowercase letters, numbers, and hyphens <br /> Cannot start or end with hyphen |
-| sqlDatabaseName | ${resourceBaseName} | Name of Azure SQL Database | 1-128 characters, can't use <>*%&:\/? or control characters <br /> Can't end with period or space |
-| sqlDatabaseSku | Basic | SKU of Azure SQL Database | |
-| apimServiceName | ${resourceBaseName} | Name of APIM Service | 1-50 alphanumerics and hyphens <br /> Start with letter and end with alphanumeric |
-| apimServiceSku | Consumption | SKU of APIM Service | Please refer this [page](/azure/templates/microsoft.apimanagement/service?tabs=bicep&branch)for available SKUs |
-| apimProductName | ${resourceBaseName} | Name of APIM Product | 1-80 alphanumerics and hyphens <br /> Start with letter and end with alphanumeric |
-| apimOauthServerName | ${resourceBaseName} | Name of APIM OAuth Server | 1-80 alphanumerics and hyphens <br /> Start with letter and end with alphanumeric |
+| sqlServerName | ${resourceBaseName} | Name of Azure SQL server | 1-63 lowercase letters, numbers, and hyphens <br /> Can't start or end with hyphen |
+| sqlDatabaseName | ${resourceBaseName} | Name of Azure SQL database | 1-128 characters, can't use <>*%&:\/? or control characters <br /> Can't end with period or space |
+| sqlDatabaseSku | Basic | SKU of Azure SQL database | Not applicable |
+| apimServiceName | ${resourceBaseName} | Name of APIM service | 1-50 alphanumerics and hyphens <br /> Start with letter and end with alphanumeric |
+| apimServiceSku | Consumption | SKU of APIM service | [Available SKUs](/azure/templates/microsoft.apimanagement/service?tabs=bicep&branch) |
+| apimProductName | ${resourceBaseName} | Name of APIM product | 1-80 alphanumerics and hyphens <br /> Start with letter and end with alphanumeric |
+| apimOauthServerName | ${resourceBaseName} | Name of APIM OAuth server | 1-80 alphanumerics and hyphens <br /> Start with letter and end with alphanumeric |
+| keyVaultSkuName | standard | SKU name of Azure Key Vault Service| |
-In the meanwhile, following parameters are available with values populated during provision. The purpose of these placeholders is to ensure we can create new resources for you when you created a new environment. The actual values are resolved from `.fx/states/state.{env}.json`.
+In the meanwhile, following parameters are available with values populated during provision. The purpose of these placeholders is to ensure we can create new resources for you in new environment. The actual values are resolved from `.fx/states/state.{env}.json`.
##### AAD application-related parameters | Parameter name | Default value place holder | Meaning of the place holder | How to customize | | | | | |
-| Microsoft 365 ClientId | {{state.fx-resource-aad-app-for-teams.clientId}} | Your app's AAD app client id created during provision | Refer [this section](#use-an-existing-aad-app-for-your-teams-app) to customize the value |
-| Microsoft 365 ClientSecret | {{state.fx-resource-aad-app-for-teams.clientSecret}} | Your app's AAD app client secret created during provision | Refer [this section](#use-an-existing-aad-app-for-your-teams-app) to customize the value |
-| Microsoft 365TenantId | {{state.fx-resource-aad-app-for-teams.tenantId}} | Tenant Id of your app's AAD app | Refer [this section](#use-an-existing-aad-app-for-your-teams-app) to customize the value |
-| Microsoft 365 OauthAuthorityHost | {{state.fx-resource-aad-app-for-teams.oauthHost}} | OAuth authority host of your app's AAD app | Refer [this section](#use-an-existing-aad-app-for-your-teams-app) to customize the value |
-| botAadAppClientId | {{state.fx-resource-bot.botId}} | Bot's AAD app client Id created during provision | Refer [this section](#use-an-existing-aad-app-for-your-bot) to customize the value |
-| botAadAppClientSecret | {{state.fx-resource-bot.botPassword}} | Bot's AAD app client secret created during provision | Refer [this section](#use-an-existing-aad-app-for-your-bot) to customize the value |
-| apimClientId | {{state.fx-resource-apim.apimClientAADClientId}} | APIM's AAD app client Id created during provision | Delete the placeholder and fill the actual value |
+| Microsoft 365 ClientId | {{state.fx-resource-aad-app-for-teams.clientId}} | Your app's AAD app client id created during provision | [Customize the value](#use-an-existing-aad-app-for-your-teams-app) |
+| Microsoft 365 ClientSecret | {{state.fx-resource-aad-app-for-teams.clientSecret}} | Your app's AAD app client secret created during provision | [Customize the value](#use-an-existing-aad-app-for-your-teams-app) |
+| Microsoft 365 TenantId | {{state.fx-resource-aad-app-for-teams.tenantId}} | Tenant Id of your app's AAD app | [Customize the value](#use-an-existing-aad-app-for-your-teams-app) |
+| Microsoft 365 OAuthAuthorityHost | {{state.fx-resource-aad-app-for-teams.oauthHost}} | OAuth authority host of your app's AAD app | [Customize the value](#use-an-existing-aad-app-for-your-teams-app) |
+| botAadAppClientId | {{state.fx-resource-bot.botId}} | Bot's AAD app client Id created during provision | [Customize the value](#use-an-existing-aad-app-for-your-bot) |
+| botAadAppClientSecret | {{state.fx-resource-bot.botPassword}} | Bot's AAD app client secret created during provision | [Customize the value](#use-an-existing-aad-app-for-your-bot) |
+| apimClientId | {{state.fx-resource-apim.apimClientAADClientId}} | APIM's AAD app client ID created during provision | Delete the placeholder and fill the actual value |
| apimClientSecret | {{state.fx-resource-apim.apimClientAADClientSecret}} | APIM's AAD app client secret created during provision | Delete the placeholder and fill the actual value | ##### Azure resource-related parameters
In the meanwhile, following parameters are available with values populated durin
#### Referencing environment variables in parameter files
-Some times you may not want to hardcode the values in parameter files. For example, when the value is a secret. The parameter files support referencing the values from environment variables. You can use syntax `{{$env.YOUR_ENV_VARIABLE_NAME}}` in parameter values to tell the tooling that the value needs to be resolved from current environment variable.
+If you don't want to hardcode the values in parameter files, for example, when the value is a secret. The parameter files support referencing the values from environment variables. You can use syntax `{{$env.YOUR_ENV_VARIABLE_NAME}}` in parameter values for the tool to resolve from current environment variable.
-Following example will read the value of `mySelfHostedDbConnectionString` parameter from environment variable `DB_CONNECTION_STRING`:
+The following example reads the value of `mySelfHostedDbConnectionString` parameter from environment variable `DB_CONNECTION_STRING`:
```json ...
Following example will read the value of `mySelfHostedDbConnectionString` parame
#### Customize ARM template files
-If the predefined templates does not meet your application requirement, you can customize the ARM templates under `templates/azure` folder. For example, you can customize the ARM template to create some additional Azure resources for your app. This is an advance scenario and requires you have basic knowledge of bicep language which is used to author ARM template. You can get started with bicep at [bicep documentation](/azure/azure-resource-manager/bicep/?branch).
+If the predefined templates doesn't meet your application requirement, you can customize the ARM templates under `templates/azure` folder. For example, you can customize the ARM template to create some additional Azure resources for your app. You need to have basic knowledge of bicep language, which is used to author ARM template. You can get started with bicep at [bicep documentation](/azure/azure-resource-manager/bicep/?branch).
+ > [!NOTE]
-> The ARM template is shared by all environments. You can use [conditional deployment](/azure/azure-resource-manager/bicep/conditional-resource-deployment?branch) if the provision behavior various between environments.
+> The ARM template is shared by all environments. You can use [conditional deployment](/azure/azure-resource-manager/bicep/conditional-resource-deployment?branch) if the provision behavior varies between environments.
-To ensure the TeamsFx tooling functions properly, please ensure your customized ARM template satisfies following requirement. If you use other tooling for further development, you can ignore these requirements.
+To ensure the TeamsFx tool functions properly, ensure you customize ARM template, which satisfies the following requirement. If you use other tool for further development, you can ignore these requirements.
-* Keep the folder structure and file name unchanged. The tool may append new content to existing files when you add more resources / capabilities to your project.
-* Keep the name of auto-generated parameters as well as its property names unchanged. The auto-generated parameters may be used when you add more resources / capabilities to your project.
-* Keep the output of auto-generated ARM template unchanged. You can add additional outputs to ARM template. The output will be persisted to `.fx/states/state.{env}.json` and used in other features like deploy, validate manifest file, etc.
+* Keep the folder structure and file name unchanged. The tool may append new content to existing files when you add more resources or capabilities to your project.
+* Keep the name of auto-generated parameters as well as its property names unchanged. The auto-generated parameters may be used when you add more resources or capabilities to your project.
+* Keep the output of auto-generated ARM template unchanged. You can add additional outputs to ARM template. The output is `.fx/states/state.{env}.json` and can be used in other features such as deploy, validate manifest file.
### Customization scenarios
-These are some common scenarios you can customize the provision behavior.
+You can customize the following scenarios:
#### Use an existing AAD app for your Teams app
You can add following configuration snippet to `.fx/configs/config.{env}.json` f
} ```
-After added above snippet, add your secret to related environment variable so the tooling can resolve the actual secret during provision.
+After adding the snippet, add your secret to related environment variable so the tool can resolve the actual secret during provision.
> [!NOTE]
-> You should not share one AAD app in multiple environments. If you do not have permission to update the AAD app, you will get a warning with instructions about how to manually update the AAD app. Please follow the instructions to update your AAD app after provision.
+> Ensure not to share the same AAD app in multiple environments. If you don't have permission to update the AAD app, you can get a warning with instructions about how to manually update the AAD app. Follow the instructions to update your AAD app after provision.
#### Use an existing AAD app for your bot
-You can add following configuration snippet to `.fx/configs/config.{env}.json` file to use an AAD app created by yourself for your bot.
+You can add following configuration snippet to `.fx/configs/config.{env}.json` file to use an AAD app created by yourself for your bot:
```json "bot": {
You can add following configuration snippet to `.fx/configs/config.{env}.json` f
} ```
-After added above snippet, add your secret to related environment variable so the tooling can resolve the actual secret during provision.
-
-> [!NOTE]
-> You should not share one AAD app in multiple environments.
+After adding the preceding snippet, add your secret to related environment variable for the tool to resolve the actual secret during provision.
#### Skip adding user for SQL database
-Sometimes you may get insufficient permission error when the tool tries to add user to SQL database. You can add following configuration snippet to `.fx/configs/config.{env}.json` file to skip adding SQL database user.
+If you have insufficient permission error when the tool tries to add user to SQL database, you can add the following configuration snippet to `.fx/configs/config.{env}.json` file to skip adding SQL database user:
```json "skipAddingSqlUser": true
Sometimes you may get insufficient permission error when the tool tries to add u
### Specifying the name of Function App instance
-This example, I will specify another name `contosoteamsappapi` for Function App instance instead of using the default name.
+You can use `contosoteamsappapi` for function app instance instead of using the default name.
> [!NOTE]
-> If you already provisioned the environment, specifying the name will create a new Function App instance for you, instead of renaming the instance created previously.
+> If you have already provisioned the environment, specifying the name can create a new function app instance for you, instead of renaming the instance created previously.
The following steps are: 1. Open `.fx/configs/azure.parameters.{env}.json` for your current environment. 2. Add a new property `functionAppName` to the value of parameter `provisionParameters`.
-3. Fill "contosoteamsappapi" as value of `functionAppName`
-4. The final parameter file is shown as following:
+3. Enter `contosoteamsappapi` as value of `functionAppName`
+4. Final parameter file is shown in the following snippet:
```json {
The following steps are:
### Scenerio
-**To add other Azure resource (Azure storage) to the application**
+**To add other Azure resource or storage to the application**
-Consider the scenario, you want to add Azure Storage to your Azure Function backend to store some blob data. There is no auto flow to update the bicep template with Azure Storage support. However, you can edit the bicep file and add the resource. The steps are as follows
+Consider the scenario, you want to add Azure storage to your Azure function backend to store blob data. There is no auto flow to update the bicep template with Azure storage support. However, you can edit the bicep file and add the resource. The steps are as follows:
-1. Create a tab project
-2. Add a function to the project. You can visit [Add Resources](./add-resource.md) to learn more about adding resources.
-3. Declare the new Storage Account in ARM template. For simplify, we will declare the resource at `templates/azure/provision/function.bicep` directly. You're free to declare the resources in other places.
+1. Create a tab project.
+2. Add function to the project. For more information, see [add resources](./add-resource.md).
+3. Declare the new storage account in ARM template. You can declare the resource at `templates/azure/provision/function.bicep` directly. You're free to declare the resources in other places.
`````````bicep var applicationStorageAccountName = 'myapp${uniqueString(resourceGroup().id)}'
Consider the scenario, you want to add Azure Storage to your Azure Function back
} `````````
-4. Update the Azure Function App Settings with Azure Storage connection string in `templates/azure/provision/function.bicep`, which is the same file in step 3. Add following snippet to `functionApp` resource's `appSettings` array.
+4. Update the Azure function app settings with Azure storage connection string in `templates/azure/provision/function.bicep`. Add the following snippet to `functionApp` resource's `appSettings` array:
``````````````````bicep {
Consider the scenario, you want to add Azure Storage to your Azure Function back
} ```````````````````
-5. Now your can update your function with Azure Storage output bindings.
+5. You can update your function with Azure storage output bindings.
## FAQ
Consider the scenario, you want to add Azure Storage to your Azure Function back
<summary><b>How to troubleshoot?</b></summary>
-If you met errors with Teams Toolkit in Visual Studio Code, you can click the `Get Help` button on the error notification to navigate to related help doc. If you're using TeamsFx CLI, there will be a hyper link at the end of error message that points to the help doc. You can also view [provision help doc](https://aka.ms/teamsfx-arm-help) directly.
+If you get errors with Teams Toolkit in Visual Studio Code, you can select **Get Help** on the error notification to navigate to the related document. If you're using TeamsFx CLI, there will be a hyperlink at the end of error message that points to the help doc. You can also view [provision help doc](https://aka.ms/teamsfx-arm-help) directly.
<br>
If you met errors with Teams Toolkit in Visual Studio Code, you can click the `G
<summary><b>How can I switch to another Azure subscription while provisioning?</b></summary> 1. Switch subscription in current account or log out and select a new subscription.
-2. If you already provisioned current environment, you need to create a new environment and perform provision because ARM does not support moving resources.
-3. If you did not provision current environment, you can trigger provision directly.
+2. If you have already provisioned current environment, you need to create a new environment and perform provision because ARM doesn't support moving resources.
+3. If you didn't provision current environment, you can trigger provision directly.
<br>
Before provision, the tool will ask you if you want to create a new resource gro
<details>
-<summary><b>How can I provision SharePoint-based app?</b></summary>
+<summary><b>How can I provision sharepoint-based app?</b></summary>
-You can follow [Provision SharePoint-based app](/microsoftteams/platform/sbs-gs-spfx?tabs=vscode%2Cviscode&tutorial-step=4&branch) to provision SharePoint-based app.
+You can follow [provision SharePoint-based app](/microsoftteams/platform/sbs-gs-spfx?tabs=vscode%2Cviscode&tutorial-step=4&branch).
> [!NOTE]
-> Currently, the building Teams App with SharePoint Framework using Teams Toolkit doesn't have direct integration with Azure, contents in this doc does not apply to SPFx based apps.
+> Currently, the building Teams app with sharepoint framework with Teams Toolkit doesn't have direct integration with Azure, the contents in the doc doesn't apply to SPFx based apps.
<br>
You can follow [Provision SharePoint-based app](/microsoftteams/platform/sbs-gs-
## See also
-> [!div class="nextstepaction"]
-> [Deploy Teams app to the cloud](deploy.md)
-
-> [!div class="nextstepaction"]
-> [Manage multiple environments](TeamsFx-multi-env.md)
-
-> [!div class="nextstepaction"]
-> [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
+* [Deploy Teams app to the cloud](deploy.md)
+* [Manage multiple environments](TeamsFx-multi-env.md)
+* [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
platform Publish https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/publish.md
Last updated 11/29/2021
# Publish Teams apps using Teams Toolkit
-After creating the app, you can distribute your app to different scope, such as individual, team, organization, or anyone. The distribution depends on multiple factors, including needs, business and technical requirements, and your goal for the app. Distribution to different scope may need different review process. In general, the bigger the scope, the more review the app need to go through for security and compliance concerns.
+After creating the app, you can distribute your app to different scope, such as individual, team, organization, or anyone. The distribution depends on multiple factors, including needs, business and technical requirements, and your goal for the app. Distribution to different scope may need different review process. In general, the bigger the scope, the more review the app needs to go through for security and compliance concerns.
## Prerequisite * [Install Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version v3.0.0+. > [!TIP]
-> You should already have a Teams app project.
+> Ensure you have Teams app project in VS code.
-## Publish to individual scope (sideloading permission)
+## Publish to individual scope or sideload permission
-Users can add custom app to Teams by uploading an app package in a .zip file directly to a team or in personal context. Adding a custom app by uploading an app package, also known as side loading, allows you test app as it's being developed, before it's ready to be widely distributed as mentioned in the following scenarios:
+The users can add custom app to Teams by uploading an app package in a *.zip file directly to a team or in personal context. Adding a custom app by uploading an app package is known as sideloading and allows you to test app while being developed, before the app is ready to be widely distributed as mentioned in the following scenarios:
-* Test and debug an app locally yourself or with other developers.
-* Built an app just for yourself. For example, to automate a workflow.
-* You built an app for a small set of users, such as, your work group.
+* Test and debug an app locally.
+* Build an app for yourself, such as to automate a workflow.
+* Build an app for small set of users, such as, your work group.
-It also lets you build an app for internal use only and share it with your team without submitting it to the Teams app catalog in the Teams app store.
+You can build an app for internal use only and share it with your team without submitting it to the Teams app catalog in the Teams app store.
-* Build your app to *.zip app package file
+**To build your app to *.zip app package file**
- You can build the app package by selecting `Zip Teams metadata package` from DEPLOYMENT panel in Treeview of Teams Toolkit. You may need to run `Provision in the cloud` at first. The generated app package will be located in `{your project folder}/build/appPackage/appPackage.{env}.zip` as shown in the following image:
+You can build the app package by selecting `Zip Teams metadata package` from **DEPLOYMENT** in Treeview of Teams Toolkit. You need to run `Provision in the cloud` first. The generated app package will be located in `{your project folder}/build/appPackage/appPackage.{env}.zip`.
- ![upload custom app](./images/sideload-check.png)
+Perform the following steps to upload app package:
+
+1. In the Teams client, select **Apps** in left bar.
+2. Select **Manage your apps**.
+3. Select **publish an app**
+
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/pub.png" alt-text="publish":::
+
+4. Select **Upload a custom app**:
+
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/uplo.png" alt-text="upload":::
## Publish to your organization
-When the app is ready for use in production, the developer can submit the app using the Teams App Submission API, called from Graph API, an integrated development environment (IDE) such as Visual Studio Code installed with Teams toolkit. You can either select **Publish to Teams** from DEPLOYMENT panel in TreeView of Teams Toolkit, or trigger **Teams: Publish to Teams** from command palette. Then select **Install for your organization** as shown in the following image:
+When the app is ready for use in production, you can submit the app using the Teams app submission API, called from Graph API, an integrated development environment (IDE) such as Visual Studio Code installed with Teams toolkit. You can either select **Publish to Teams** from **DEPLOYMENT** in TreeView of Teams Toolkit, or trigger **Teams: Publish to Teams** from command palette. Then select **Install for your organization**:
![Install for your organization](./images/installforyourorganization.png)
-Doing this makes the app available on the Manage apps page of the Microsoft Teams admin center, where you, and the admin, can review and approve it.
+The app is available on the **Manage apps** of Microsoft Teams admin center, where you, and the admin, can review and approve it.
-As an admin, the manage apps page in the [Microsoft Teams admin center](https://admin.teams.microsoft.com/policies/manage-apps) is where you view and manage all Teams apps for your organization. Here, you can see the org-level status and properties of apps, approve or upload new custom apps to your organization's app store, block or allow apps at the org level, add apps to teams, purchase services for third-party apps, view permissions requested by apps, grant admin consent to apps, and manage org-wide app settings.
+As an admin, **Manage apps** in the [Microsoft Teams admin center](https://admin.teams.microsoft.com/policies/manage-apps) is where you can view and manage all Teams apps for your organization. You can see the org level status and properties of apps, approve or upload new custom apps to your organization's app store, block or allow apps at the org level, add apps to teams, purchase services for third-party apps, view permissions requested by apps, grant admin consent to apps, and [manage org wide app settings](https://admin.teams.microsoft.com/policies/manage-apps).
-[Manage apps page in teams admin center](https://admin.teams.microsoft.com/policies/manage-apps)
Teams toolkit for Visual Studio Code built on top of the Teams App Submission API and it allows you to automates the submission-to-approval process for custom apps on Teams. > [!NOTE]
-> Keep in mind that this doesn't publish the app to your organization's app store yet. This step submits the app to the Microsoft Teams admin center where you can approve it for publishing to your organization's app store.
+> The app doesn't publish to your organization's app store yet. The step submits the app to the Microsoft Teams admin center where you can approve it for publishing to your organization's app store.
-## Admin approval for submitted Teams apps
+## Admin approval for Teams apps
-The admin of your Teams tenant can then go to the Manage apps page in the Microsoft Teams admin center (in the left navigation, go to Teams apps > Manage apps), gives you a view into all Teams apps for your organization. The Pending approval widget at the top of the page lets you know when a custom app is submitted for approval.
-In the table, a newly submitted app automatically shows a Publishing status of Submitted and Status of Blocked. You can sort the Publishing status column in descending order to quickly find the app:
+The admin of your Teams tenant can then go to the **Manage apps** in the Microsoft Teams admin center, in the left navigation, go to Teams apps > Manage apps. You can view into all Teams apps for your organization. In the Pending approval widget at the top of the page lets you know when a custom app is submitted for approval.
+In the table, a newly submitted app automatically publish the status of submitted and blocked apps. You can sort the publishing status column in descending order to find the app:
- ![Admin approval for submitted teams app](./images/admin-approval-for-teams-app.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/admin-approval-for-teams-app-1.png" alt-text="approval":::
-Select the app name to go to the app details page. On the About tab, you can view details about the app, including description, status, submitter, and app ID:
+Select the app name to go to the app details page. On the About tab, you can view details about the app, including description, status, and app ID:
- ![Details about admin approved submitted teams app](./images/about-submitted-app.png)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/about-submitted-app-1.png" alt-text="submitted app":::
-When you're ready to make the app available to users, follow the steps to publish the app:
+Perform the following steps to publish the app :
-1. In the left navigation of the Microsoft Teams admin center, go to Teams apps > Manage apps.
-2. Select the app name to go to the app details page, and then in the Publishing status box, select Publish.
-After you publish the app, the Publishing status changes to Published and the Status automatically changes to Allowed.
+1. In the left navigation of the Microsoft Teams admin center, go to Teams apps > **Manage apps**.
+2. Select the app name to go to the app details page, and then in the status box, select **Publish**.
+After you publish the app, the publishing status changes to published and the status automatically changes to allowed.
-## Publish to Microsoft Store
+## Publish to Microsoft store
-You can distribute your app directly to the store inside Microsoft Teams and reach millions of users around the world. If your app is also featured in the store, you can instantly reach potential customers.
-Apps published to the Teams store also automatically list on Microsoft AppSource, which is the official marketplace for Microsoft 365 apps and solutions.
-Understand the publishing process
-When you feel your app is production ready, you can begin the process of getting it listed on the Teams store.
+You can distribute your app directly to the store inside Microsoft Teams and reach millions of users around the world. If your app is also featured in the store, you can instantly reach potential customers. The apps published to the Teams store also automatically list on Microsoft AppSource, which is the official marketplace for Microsoft 365 apps and solutions.
->[!Tip]
-> Following the pre-submission steps closely can increase the possibility that Microsoft approves your app for publishing.
-
-![Pre submission steps](./images/pre-submission-steps.png)
-
-* Review the Teams store validation guidelines to make sure your app meets Teams app and store standards.
-* Create a Partner Center developer account.
-* Prepare your store submission, which includes running automated tests, compiling test notes, creating a store listing, among other important tasks to help expedite the review process.
-* Submit your app through Partner Center.
-* Work with Microsoft directly to resolve the issues and resubmit your app (link to resolve the issues and resubmit your app).
+For more information, see [publish to microsoft Teams store]([Publish your app to the Microsoft Teams store](../concepts/deploy-and-publish/appsource/publish.md#publish-your-app-to-the-microsoft-teams-store))
## See also
-> [!div class="nextstepaction"]
-> [Manage multiple environments](TeamsFx-multi-env.md)
-
-> [!div class="nextstepaction"]
-> [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
+* [Manage multiple environments](TeamsFx-multi-env.md)
+* [Collaborate with other developers on Teams project](TeamsFx-collaboration.md)
platform Teams Toolkit Fundamentals https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/teams-toolkit-fundamentals.md
Last updated 11/29/2021
> [!NOTE] > Currently, this feature is available in **public developer preview** only.
-Teams Toolkit for Visual Studio Code helps the developers to create and deploy Teams apps with integrated identity, access to cloud storage, data from Microsoft Graph, and other services in Azure and Microsoft 365 with a zero-configuration approach to the developer experience.
+Teams Toolkit for Visual Studio Code helps you to create and deploy Teams apps with integrated identity, access to cloud storage, data from Microsoft Graph, and other services in Azure and Microsoft 365 with zero-configuration approach. For Teams app development, similar to Teams Toolkit for Visual Studio, you can use [CLI tool](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/cli/user-manual.md), which consists of Toolkit `teamsfx`.
-There is a Teams Toolkit for Visual Studio and a [CLI tool](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/cli/user-manual.md) for Teams app development (called `teamsfx`).
-
-## Install the Teams Toolkit for Visual Studio Code
+## Install Teams Toolkit for Visual Studio Code
1. Open **Visual Studio Code.**
+1. Select the Extensions view (**Ctrl+Shift+X** / **⌘⇧-X** or **View > Extensions**):
-1. Select the Extensions view (**Ctrl+Shift+X** / **⌘⇧-X** or **View > Extensions**).
-
-1. In the search box, enter **Teams Toolkit**.
-
-1. Select **install** button next to the Teams Toolkit.
-
-Or you can find the Teams Toolkit on the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension).
-
-## Support Teams apps capabilities
-
-[Microsoft Teams app capabilities](../concepts/capabilities-overview.md) are Teams extensibility points.Teams Toolkit for Visual Studio Code supports developers to work on project with the following Teams App Capabilities:
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/install toolkit-1.png" alt-text="install":::
-* [Tabs](../tabs/what-are-tabs.md#build-tabs-for-microsoft-teams)
+1. Enter **Teams Toolkit** in the search box:
-* [Bots](../bots/what-are-bots.md#bots-in-microsoft-teams)
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/install toolkit-2.png" alt-text="Toolkit":::
-* [Messaging extensions](../messaging-extensions/what-are-messaging-extensions.md#messaging-extensions)
+1. Select **Install**:
+
+ :::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/install.png" alt-text="install toolkit":::
-Your Teams project can contain either one of the capabilities or all three capabilities from above. You can select any capability when you create the Teams Project.
-
-![Select capabilities to Create New Project](./images/create-project-capabilities.png)
-
-Teams Toolkit provides flexibility to add more capabilities in further process of Teams app development.
-
-![add capabilities](./images/add-capabilities.png)
+> [!TIP]
+> You can install Teams Toolkit from [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension).
## User journey of Teams Toolkit
-Teams Toolkit provides features of Teams app development to make it easy to debug, deploy, and publish. Teams Toolkit automates manual work and provides great integration of Teams and Azure resources. The following picture shows Teams Toolkit user journey:
+Teams Toolkit provides features of Teams app development to debug, deploy, and publish. It automates manual work and provides great integration of Teams and Azure resources. The following image shows Teams Toolkit user journey:
![Teams Toolkit User Journey](./images/teams-toolkit-user-journey.png) ## Take a tour of Teams Toolkit for Visual Studio Code
-If you don't open any Teams project in VS Code, or you open any project that is not created using Teams Toolkit v2.+, you will see the Teams Toolkit UI with limited functionalities as shown in following image:
+After Toolkit installation, you will see the Teams Toolkit UI as shown in following image:
-You can select **Quick Start** to explore the Teams Toolkit, or select **Create a new Teams App** to create one Teams project. If you have a Teams Project created by Teams Toolkit v2.+ opened in VS Code, you will see Teams Toolkit UI with more functionalities as shown in the following image:
+You can select **Quick Start** to explore the Teams Toolkit, or select **Create a new Teams App** to create one Teams project. If you have a Teams project created by Teams Toolkit v2.+ opened in VS Code, you will see Teams Toolkit UI with all functionalities as shown in the following image:
-Let's take a tour of functionalities that are available in Teams Toolkit:
+Let's take a tour of the topics covered in this document:
-* [Accounts](#accounts)
+## Accounts
-* [Environment](#environment)
+To develop a Teams app, you need at least one Microsoft 365 account with a valid subscription. If you want to host your backend resources on Azure, an Azure account is also needed. Teams Toolkit support integrated experience to sign in, provision and deployment for Azure resources. You can [create a free Azure account](https://azure.microsoft.com/free/) before you start.
-* [Development](#development)
+## Environment
-* [Deployment](#deployment)
+Teams Toolkit helps you to create and manage multiple environments, provision, and deploy artifacts to the target environment for Teams App.
-* [Help and Feedback](#help-and-feedback)
+### TeamsFx Collaboration
-### Accounts
+It allows developers and project owner to invite other collaborators to the TeamsFx project to debug, provision, and deploy the same TeamsFx project.
-Developers must have a Microsoft 365 account to build Teams app. If you don't have one, you can get free Teams developer account by joining the [Microsoft 365 developer program](https://developer.microsoft.com/microsoft-365/dev-program):
+## Development
-![Teams Toolkit Take a Tour - Accounts](./images/teams-toolkit-accounts.png)
+Teams Toolkit helps you to create and customize your Teams app project that makes the Teams app development work simpler.
-Azure account is commonly used in Teams app development. If you wish to host your Teams app or access resources on Azure, you must have an Azure account. Teams Toolkit support integrated experience to sign in, provision and deployment for Azure resources. You can [create a free Azure account](https://azure.microsoft.com/free/) before you start.
+### Create a new Teams app
- For more information, see [prepare accounts to build Teams app](accounts.md)
+It helps you to start with Teams app development by creating new Teams project using Teams Toolkit either by using **Create new project** or **Create from samples**.
-### Environment
+### Add capabilities
-Teams Toolkit helps you to manage multiple environments. You can add, configure, and customize environments. You can choose to add collaborators for each environment:
+It helps to add other required Teams capabilities to Teams app during development process.
-![Teams Toolkit Take a Tour - Environment](./images/teams-toolkit-env.png)
+### Add cloud resources
- For more information, see [manage multiple environments](TeamsFx-multi-env.md) and [collaborate with other developers on Teams project](TeamsFx-collaboration.md).
+It helps you to optionally add cloud resources that fits your development needs.
-### Development
+### Edit manifest file
-Teams Toolkit provides convenience for you to create and customize your Teams app project that makes the Teams app development work easily and quickly:
+It helps you to edit the Teams app integration with Teams client.
-![Teams Toolkit Take a Tour - Development](./images/teams-toolkit-development.png)
+## Deployment
-1. **Create a new Teams app**, helps to start Teams app development work with either a "hello world" template project or a sample project. For more information, see [create new Teams project](create-new-project.md)
-1. **View samples**, shows a set of Teams sample apps for you to explore, refer, and develop.
-1. **Add capabilities**, helps to add another Teams capabilities to Teams app at any time during development process. For more information, see [add capabilities to your Teams app](add-capability.md)
-1. **Add cloud resources** lets you add additional cloud resources according to the requirement change.For more information, see [add cloud resources for your Teams app](add-resource.md)
-1. **Edit manifest file** lets you easily edit how the Teams app integrates with Teams client. For more information, see [preview Teams manifest file](TeamsFx-manifest-preview.md) and [edit Teams manifest file](TeamsFx-manifest-customization.md).
+During or after the development, ensure to provision, deploy, and publish Teams app before it is accessible to users.
-### Deployment
+### Provision in the cloud
-During or after the development, you should follow the process to do provision, deployment, and publish Teams app before it is accessible to your users:
+It integrates with Azure resource manager that enables you to provision Azure resources, which your application needs for code approach.
-![Teams Toolkit Take a Tour - Deployment](./images/teams-toolkit-deployment.png)
+### Deploy to the cloud
-1. If you want to host your Teams app on Azure or you need to use Azure resources, **Provision in the cloud** helps you automate the process to create Azure resources. To use it you must have an Azure Subscription. For more information, see [provision cloud resources](provision.md).
+ It helps you to deploy the source code to Azure.
-1. Before publishing your app or sharing, you can build your Teams app into packages by selecting **Zip Teams metadata package**.
+### Publish to Teams
-1. **Deploy to the cloud** helps you to deploy their source code to Azure. The prerequisite to run deploy is to have provisioned resources by running **Provision in the cloud** or you have to create the Azure resources manually and specify the resource parameter in your project environment settings. For more information, see [deploy Teams app to the cloud](deploy.md).
+After creating the app, you can distribute your app to different scope, such as individual, team, organization, or anyone. Publish to Teams helps you to publish your developed app.
-1. Instead of manually publishing your custom Teams app, you can use **Publish to Teams** function to call Teams api to publish Teams app. You need the permission to upload Teams app. For more information, see [publish your app to Teams](publish.md).
+### CI/CD guide
-1. Developer Portal for Teams is where you can manage and distribute your Teams app.For more information, see [developer portal](/microsoftteams/platform/concepts/build-and-test/teams-developer-portal)
+It helps to automate your development workflow while building Teams application. CI/CD guide provides tools and templates for you to get started while setting up CI or CD pipelines.
-1. Teams Toolkit also provides CI/CD template for CI/CD tools like GitHub workflow, Azure Devops and Jenkins. For more information, see [build CI/CD pipelines for Teams application](use-CICD-template.md)
+#### TeamsFx CLI
-### Help and Feedback
+TeamsFx CLI is a text-based command line interface that accelerates Teams application development and also enables CI/CD scenario where you can integrate CLI in scripts for automation.
-In this section, you can easily find the documentation and resources you need. You can select **Report issues on GitHub** in the Teams Toolkit to get **Quick support** from product expert. Browse the issue before you create a new one, or visit [StackOverflow tag `teams-toolkit`](https://stackoverflow.com/questions/tagged/teams-toolkit) to browse and ask questions:
+#### TeamsFx SDK
-![Teams Toolkit Take a Tour - Help](./images/teams-toolkit-help.png)
+It helps you to reduce tasks of implementing identity and access to cloud resources to single-line statements with zero configuration.
-## See also
+## Help and Feedback
+
+In this section, you can find the documentation and resources you need. You can select **Report issues on GitHub** in the Teams Toolkit to get **Quick support** from product expert. Browse the issue before you create a new one, or visit [StackOverflow tag `teams-toolkit`](https://stackoverflow.com/questions/tagged/teams-toolkit) to submit feedback.
-> [!div class="nextstepaction"]
-> [Create new project use Teams Toolkit](create-new-project.md)
+## See also
-> [!div class="nextstepaction"]
->[Prepare accounts to build Teams apps](accounts.md)
+* [Create new project use Teams Toolkit](create-new-project.md)
+* [Prepare accounts to build Teams apps](accounts.md)
+* [Publish Teams apps using Teams Toolkit](publish.md)
+* [Use Teams Toolkit to provision cloud resources](provision.md)
+* [Deploy to the cloud](deploy.md)
platform Use CICD Template https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/use-CICD-template.md
Last updated 11/29/2021
-# CI or CD support for Teams application developers
+# CI/CD guide
-TeamsFx helps to automate your development workflow while building Teams application. The document provides tools and pre-cooked templates for you to get started while setting up CI or CD pipelines with the most popular development platforms including GitHub, Azure Devops and Jenkins.
+TeamsFx helps to automate your development workflow while building Teams application. The document provides tools and templates for you to get started with setting up CI or CD pipelines with GitHub, Azure Devops and Jenkins.
-|Tools and Templates|Description|
+|Tools and Templates|Description|
|||
-|[teamsfx-cli-action](https://github.com/OfficeDev/teamsfx-cli-action)|A ready-to-use GitHub Action that integrates with TeamsFx CLI.|
-|[github-ci-template.yml](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/github-ci-template.yml) and [github-cd-template.yml](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/github-cd-template.yml)| GitHub CI or CD templates for a Teams app. |
+|[teamsfx-cli-action](https://github.com/OfficeDev/teamsfx-cli-action)|GitHub Action that integrates with TeamsFx CLI.|
+|[github-ci-template.yml](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/github-ci-template.yml) and [github-cd-template.yml](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/github-cd-template.yml)| GitHub CI or CD templates for Teams app. |
|[jenkins-ci-template.Jenkinsfile](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/jenkins-ci-template.Jenkinsfile) and [jenkins-cd-template.Jenkinsfile](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/jenkins-cd-template.Jenkinsfile)|Jenkins CI or CD templates for a Teams app.|
-|[script-ci-template.sh](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-ci-template.sh) and [script-cd-template.sh](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-cd-template.sh)| Script templates for automation everywhere else outside of GitHub. |
+|[script-ci-template.sh](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-ci-template.sh) and [script-cd-template.sh](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-cd-template.sh)| Script templates for automation outside of GitHub. |
## CI or CD workflow templates in GitHub **To include CI or CD workflows to automate Teams app development process in GitHub**:
-1. Create a folder under `.github/workflows`
-1. Copy the template files (either one or both of them):
+1. Create folder under `.github/workflows`
+1. Copy an one of the following template files:
* [github-ci-template.yml](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/github-ci-template.yml) for CI workflow. * [github-cd-template.yml](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/github-cd-template.yml) for CD workflow.
-1. Customize these workflows to fit your scenarios.
+1. Customize the workflows that fit your scenarios.
### Customize CI workflow
-You can make the following changes to adapt the workflow for your project:
+Perform the following steps to adapt the workflow for your project:
-1. Change how the CI flow is triggered. We default to when a pull request is created targeting the `dev` branch.
-1. Use a npm build script, or customize the way you build the project in the automation code.
-1. Use a npm test script which returns zero for success, and/or change the test commands.
+1. Change the CI flow.
+1. Use npm build script, or customize the way you build the project in automation code.
+1. Use npm test script which returns zero for success, and change the test commands.
### Customize CD workflow
-The following steps to customize CD workflow:
+Perform the following the steps to customize CD workflow:
1. By default, the CD workflow is triggered, when new commits are made to the `main` branch.
-1. Create GitHub [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) by environment to hold Azure or Microsoft 365 login credentials. The following table lists all the secrets you need to create on GitHub, and for detailed usage, please refer to the GitHub Actions [README.md](https://github.com/OfficeDev/teamsfx-cli-action/blob/main/README.md).
+1. Create GitHub [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) by environment to hold Azure service principal and M365 account login credentials. For more information,see [GitHub Actions](https://github.com/OfficeDev/teamsfx-cli-action/blob/main/README.md).
1. Change the build scripts if necessary.
-1. Remove the test scripts if you don't have tests.
+1. Remove the test scripts as required.
+
+> [!NOTE]
+> The provision step is not included in the CD template as it's usually executed only once. You can either execute provision within Teams Toolkit, TeamsFx CLI, or using a separate workflow. Ensure to commit after provisioning. The results of provisioning are deposited in `.fx` folder.
-> [!Note]
-> The provision step is not included in the CD template as it's usually executed only once. You can either execute provision Within Teams Toolkit, TeamsFx CLI, or using a separated workflow. Please remember to commit after provisioning (results of provisioning will be deposited inside the `.fx` folder) and save the file content of `.fx/states/{YOUR_ENV_NAME}.userdata` into GitHub [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) with name `USERDATA_CONTENT` for future usage.
+### Github secrets
-### Environment variables
+The following table lists all the secrets you need to create environment in GitHub:
-Steps to create environment variables in GitHub::
+1. Select **Settings**.
+1. Go to **Environments** section.
+1. Select **New environment**.
+1. Enter a name for your environment. The default environment name provided in the template is `test_environment`.
+1. Select **Configure environment**.
+1. Select **Add Secret**.
-1. In the project **Settings** page, navigate to **Environments** section and select **New environment**.
-1. Enter a name for your environment. The default environment name provided in the template is `test_environment`. Select **Configure environment** to proceed.
-1. In the next page, Select **Add Secret** to add secrets for each of the items listed in the table below.
+The following table lists all the secrets required to create environment:
|Name|Description| |||
-|AZURE_ACCOUNT_NAME|The account name of Azure which is used to provision resources.|
-|AZURE_ACCOUNT_PASSWORD|The password of Azure account.|
+|AZURE_SERVICE_PRINCIPAL_NAME|The service principal name of Azure used to provision resources.|
+|AZURE_SERVICE_PRINCIPAL_PASSWORD|The password of Azure service principal.|
|AZURE_SUBSCRIPTION_ID|To identify the subscription in which the resources will be provisioned.| |AZURE_TENANT_ID|To identify the tenant in which the subscription resides.|
-|Microsoft 365_ACCOUNT_NAME|The Microsoft 365 account for creating and publishing the Teams App.|
-|Microsoft 365_ACCOUNT_PASSWORD|The password of the Microsoft 365 account.|
-|Microsoft 365_TENANT_ID|To identify the tenant in which the Teams App will be created/published. This value is optional unless you have a multi-tenant account and you want to use another tenant. Read more on [how to find your Microsoft 365 tenant ID](/azure/active-directory/fundamentals/active-directory-how-to-find-tenant).|
+|M365_ACCOUNT_NAME|The M365 account to create and publish Teams app.|
+|M365_ACCOUNT_PASSWORD|The password of the M365 account.|
+|M365_TENANT_ID|To identify the tenant in which the Teams App will be created/published. This value is optional unless you have a multi-tenant account and you want to use another tenant. For more information, see [how to find your M365 tenant ID](/azure/active-directory/fundamentals/active-directory-how-to-find-tenant).|
> [!NOTE]
-> Please refer to the [Configure Microsoft 365/Azure Credentials](https://github.com/OfficeDev/teamsfx-cli-action/blob/main/README.md#configure-m365azure-credentials-as-github-secret) to make sure you have disabled Multi-factor Authentication and Security Defaults for the credentials used in the workflow.
+> Currently, the non-interactive authentication style for M365 is used in CI or CD workflows, ensure that your M365 account has sufficient privileges in your tenant and doesn't have multi-factor authentication or other advanced security features enabled. For more information, see [Configure M365 Credentials](https://github.com/OfficeDev/teamsfx-cli-action/blob/main/README.md#configure-m365azure-credentials-as-github-secret) to make sure you have disabled multi-factor authentication and security defaults for the credentials used in the workflow.
+
+> [!NOTE]
+> Currently, service principal for Azure is used in CI/CD workflows. For more information, see[create azure service principles](#create-azure-service-principals).
+
+## Set up CI or CD pipelines with Azure DevOps
-## Set up CI or CD Pipelines with Azure DevOps
+You can set up automated pipelines in Azure DevOps, and make a reference on the scripts.
-You can set up automated pipelines in Azure DevOps, and make a reference on the scripts. Follow the steps given below to get started:
+Perform the following steps to get started:
* [CI Scripts](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-ci-template.sh) * [CD Scripts](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-cd-template.sh)
-### Set up CI Pipeline
+### Set up CI pipeline
-1. Add [CI Scripts](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-ci-template.sh) into your Azure DevOps repository, and do necessary customizations as you may infer from the comments in the script file.
+1. Add [CI Scripts](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-ci-template.sh) to your Azure DevOps repository, and do necessary customizations as you may infer from the comments in the script file.
1. Follow the [steps to create your Azure DevOps Pipeline for CI](/azure/devops/pipelines/create-first-pipeline). Here is an scenario of a common CI pipeline scripts:
steps:
filePath: './others-script-ci-template.sh' ```
-The potential changes you can make for the script or workflow definition:
+The following are the changes you can make for the script or workflow definition:
-1. Change how the CI flow is triggered. We default to when a new commit is pushed into the `dev` branch.
+1. Change the CI flow. We default to when a new commit is pushed into the `dev` branch.
1. Change the way of how to install node and npm. 1. Use npm build script, or customize the way you build in the automation code.
-1. Use npm test script which returns zero for success, and/or change the test commands.
+1. Use npm test script which returns zero for success, and change the test commands.
-### Set up CD Pipeline
+### Set up CD pipeline
1. Add [CD Scripts](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-cd-template.sh) into your Azure DevOps repository, and do necessary customizations as you may infer from the comments in the script file.
-1. Create your Azure DevOps Pipeline for CD, as you may refer to [this link](/azure/devops/pipelines/create-first-pipeline). The Pipeline's definition can be referred to the following example definition for CI Pipeline.
+1. Create your Azure DevOps pipeline for CD. For more information,see [create first pipeline](/azure/devops/pipelines/create-first-pipeline). The Pipeline's definition can be referred to the following example definition for CI Pipeline.
1. Add necessary variables by [Define variables](/azure/devops/pipelines/process/variables), and make them as secrets if necessary. ```yml
steps:
inputs: versionSpec: '14.17.0' checkLatest: true--- task: DownloadSecureFile@1
- name: userdata
- inputs:
- secureFile: 'staging.userdata'
-- task: Bash@3
- inputs:
- targetType: 'inline'
- script: |
- mkdir -p .fx/states/
- cp $(userdata.secureFilePath) .fx/states/staging.userdata
- task: Bash@3 env:
- AZURE_ACCOUNT_NAME: $(AZURE_ACCOUNT_NAME)
- AZURE_ACCOUNT_PASSWORD: $(AZURE_ACCOUNT_PASSWORD)
- AZURE_TENANT_ID: $(AZURE_TENANT_ID)
- Microsoft 365_ACCOUNT_NAME: $(Microsoft 365_ACCOUNT_NAME)
- Microsoft 365_ACCOUNT_PASSWORD: $(Microsoft 365_ACCOUNT_PASSWORD)
+ SP_NAME: $(AZURE_SERVICE_PRINCIPAL_NAME)
+ SP_PASSWORD: $(AZURE_SERVICE_PRINCIPAL_PASSWORD)
+ TENANT_ID: $(AZURE_TENANT_ID)
+ AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
+ M365_ACCOUNT_NAME: $(M365_ACCOUNT_NAME)
+ M365_ACCOUNT_PASSWORD: $(M365_ACCOUNT_PASSWORD)
inputs: filePath: './others-script-cd-template.sh' ```
-The potential changes you can make for the script or workflow definition:
+The following are the changes you can make for the script or workflow definition:
1. How the CD flow is triggered. By default it happens when new commits are made to the **main** branch. 1. Change the way of how to install node and npm.
The potential changes you can make for the script or workflow definition:
1. Ensure you have a npm build script, or customize the way you build in the automation code. 1. Ensure you have a npm test script which returns zero for success, and/or change the test commands.
-> [!Note]
-> The provision step is not included in the CD template as it's usually executed only once. You can either execute provision Within Teams Toolkit, TeamsFx CLI, or using a seperated workflow. Please remember to commit after provisioning (results of provisioning will be deposited inside the `.fx` folder) and upload `.fx/states/{YOUR_ENV_NAME}.userdata` into Azure DevOps [secure files](/azure/devops/pipelines/library/secure-files) for future usage.
-
-### Environment variables for Azure DevOps
+### Pipeline variables for Azure DevOps
-Steps to create Pipeline variables in Azure DevOps:
+Perform the following steps to create Pipeline variables in Azure DevOps:
-1. In the Pipeline editing page, select **Variables** on top right and select **New variable**.
-1. Enter Name/Value pair for your variable.
+1. In the Pipeline editing page, select **Variables** and select **New variable**.
+1. Enter Name or Value pair for your variable.
1. Toggle the checkbox of **Keep this value secret** if necessary. 1. Select **OK** to create the variable. |Name|Description| |||
-|AZURE_ACCOUNT_NAME|The account name of Azure which is used to provision resources.|
-|AZURE_ACCOUNT_PASSWORD|The password of Azure account.|
+|AZURE_SERVICE_PRINCIPAL_NAME|The service principal name of Azure used to provision resources.|
+|AZURE_SERVICE_PRINCIPAL_PASSWORD|The password of Azure service principal.|
|AZURE_SUBSCRIPTION_ID|To identify the subscription in which the resources will be provisioned.| |AZURE_TENANT_ID|To identify the tenant in which the subscription resides.|
-|Microsoft 365_ACCOUNT_NAME|The Microsoft 365 account for creating and publishing the Teams App.|
-|Microsoft 365_ACCOUNT_PASSWORD|The password of the Microsoft 365 account.|
-|Microsoft 365_TENANT_ID|To identify the tenant in which the Teams App will be created/published. This value is optional unless you have a multi-tenant account and you want to use another tenant. Read more on [how to find your Microsoft 365 tenant ID](/azure/active-directory/fundamentals/active-directory-how-to-find-tenant).|
+|M365_ACCOUNT_NAME|The M365 account for creating and publishing the Teams App.|
+|M365_ACCOUNT_PASSWORD|The password of the M365 account.|
+|M365_TENANT_ID|To identify the tenant in which the Teams App will be created/published. This value is optional unless you have a multi-tenant account and you want to use another tenant. Read more on [how to find your M365 tenant ID](/azure/active-directory/fundamentals/active-directory-how-to-find-tenant).|
-> [!NOTE]
-> The provision step is not included in the CD template as it's usually executed only once. You can either execute provision Within Teams Toolkit, TeamsFx CLI, or using a seperated workflow. Please remember to commit after provisioning (results of provisioning will be deposited inside the `.fx` folder) and save the file content of `.fx/states/{YOUR_ENV_NAME}.userdata` into Jenkins credentials for future usage.
-
-## CI or CD Pipeline Templates in Jenkins
+## CI or CD pipeline templates in Jenkins
-To add these templates to your repository, you will need your versions of [jenkins-ci-template.Jenkinsfile](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/jenkins-ci-template.Jenkinsfile) and [jenkins-cd-template.Jenkinsfile](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/jenkins-cd-template.Jenkinsfile) to be located in your repository by branch.
+To add these templates to your repository, you rquire the versions of [jenkins-ci-template.Jenkinsfile](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/jenkins-ci-template.Jenkinsfile) and [jenkins-cd-template.Jenkinsfile](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/jenkins-cd-template.Jenkinsfile) to be located in your repository by branch.
Also, you need to create CI or CD pipelines in Jenkins which point to the specific **Jenkinsfile** correspondingly.
Follow the steps to check how to connect Jenkins with different SCM platforms:
3. [Jenkins with GitLab](https://docs.gitlab.com/ee/integration/jenkins.html) 4. [Jenkins with Bitbucket](https://medium.com/ampersand-academy/integrate-bitbucket-jenkins-c6e51103d0fe)
-### Customize CI Pipeline
+### Customize CI pipeline
-There are some potential changes you can make to adapt your project:
+The following are some of the changes you can make to adapt your project:
-1. Rename the template file to **Jenkinsfile** since it's a common practice, and put it under the target branch, for example, the **dev** branch.
+1. Rename the template file to **Jenkinsfile**, and place it under the target branch, for example, the **dev** branch.
1. Change how the CI flow is triggered. We default to use the triggers of **pollSCM** when a new change is pushed into the **dev** branch. 1. Ensure you have a npm build script, or customize the way you build in the automation code. 1. Ensure you have a npm test script which returns zero for success, and/or change the test commands.
-### Customize CD Pipeline
+### Customize CD pipeline
-Change the following steps to customize CD pipeline:
+Perform the following steps to customize the CD pipeline:
-1. Rename the template file to **Jenkinsfile** since it's a common practice, and put it under the target branch, for example, the **main** branch.
-1. How the CD flow is triggered. We default to use the triggers of **pollSCM** when a new change is pushed into the **main** branch.
-1. Create Jenkins [pipeline credentials](https://www.jenkins.io/doc/book/using/using-credentials/) to hold Azure/Microsoft 365 login credentials. The table below lists all the credentials you need to create on Jenkins.
+1. Rename the template file to **Jenkinsfile**, and place it under the target branch, for example, the **main** branch.
+1. Change the CD flow. We default to use the triggers of **pollSCM** when a new change is pushed into the **main** branch.
+1. Create Jenkins [pipeline credentials](https://www.jenkins.io/doc/book/using/using-credentials/) to hold Azure service principal and M365 account login credentials.
1. Change the build scripts if necessary. 1. Remove the test scripts if you don't have tests.
-> [!Note]
- The provision step is not included in the CD template as it's usually executed only once. You can either execute provision Within Teams Toolkit, TeamsFx CLI, or using a separated workflow. Please remember to commit after provisioning (results of provisioning will be deposited inside the `.fx` folder) and save the file content of `.fx/states/{YOUR_ENV_NAME}.userdata` into Jenkins credentials for future usage.
-
-### Environment variables for Jenkins
+### Credentials for Jenkins
Follow [using-credentials](https://www.jenkins.io/doc/book/using/using-credentials/) to create credentials on Jenkins. |Name|Description| |||
-|AZURE_ACCOUNT_NAME|The account name of Azure that is used to provision resources.|
-|AZURE_ACCOUNT_PASSWORD|The password of Azure account.|
+|AZURE_SERVICE_PRINCIPAL_NAME|The service principal name of Azure used to provision resources.|
+|AZURE_SERVICE_PRINCIPAL_PASSWORD|The password of Azure service principal.|
|AZURE_SUBSCRIPTION_ID|To identify the subscription in which the resources will be provisioned.| |AZURE_TENANT_ID|To identify the tenant in which the subscription resides.|
-|Microsoft 365_ACCOUNT_NAME|The M3icrosoft 365 account for creating and publishing the Teams App.|
-|Microsoft 365_ACCOUNT_PASSWORD|The password of the Microsoft 365 account.|
-|Microsoft 365_TENANT_ID|To identify the tenant in which the Teams App will be created/published. This value is optional unless you have a multi-tenant account and you want to use another tenant. Read more on [how to find your Microsoft 365 tenant ID](/azure/active-directory/fundamentals/active-directory-how-to-find-tenant).|
-> Note: Please refer to the [Configure Microsoft 365/Azure Credentials](https://github.com/OfficeDev/teamsfx-cli-action/blob/main/README.md#configure-m365azure-credentials-as-github-secret) to make sure you have disabled Multi-factor Authentication and Security Defaults for the credentials used in the pipeline.
+|M365_ACCOUNT_NAME|The M365 account for creating and publishing the Teams App.|
+|M365_ACCOUNT_PASSWORD|The password of the M365 account.|
+|M365_TENANT_ID|To identify the tenant in which the Teams App will be created/published. This value is optional unless you have a multi-tenant account and you want to use another tenant. Read more on [how to find your M365 tenant ID](/azure/active-directory/fundamentals/active-directory-how-to-find-tenant).|
## Get started guide for other platforms
You can follow the listed pre-defined example bash scripts to build and customiz
* [CI Scripts](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-ci-template.sh) * [CD Scripts](https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-cd-template.sh)
-The scripts are pretty straightforward and most parts of them are cross-platform CLI, so it's easy to transform them to other types of script, for example, PowerShell.
The scripts are based on a cross-platform TeamsFx command line tool [TeamsFx-CLI](https://www.npmjs.com/package/@microsoft/teamsfx-cli). You can install it with `npm install -g @microsoft/teamsfx-cli` and follow the [documentation](https://github.com/OfficeDev/TeamsFx/blob/dev/docs/cli/user-manual.md) to customize the scripts.
-> [!Note]
-> To enable `@microsoft/teamsfx-cli` running in CI mode, turn on `CI_ENABLED` by `export CI_ENABLED=true`. In CI mode, `@microsoft/teamsfx-cli` is friendly for CI or CD.
+> [!NOTE]
+> * To enable `@microsoft/teamsfx-cli` running in CI mode, turn on `CI_ENABLED` by `export CI_ENABLED=true`. In CI mode, `@microsoft/teamsfx-cli` is friendly for CI or CD.
+> * To enable `@microsoft/teamsfx-cli` running in non-interactive mode, set a global config with command: `teamsfx config set -g interactive false`. In non-interactive mode, `@microsoft/teamsfx-cli` will not ask questions for inputs interactively.
-Ensure to set Azure and M365 credentials in your environment variables safely. For example if you are using GitHub as your source code repository, you can use the [Github Secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) to securely store your environment variables.
+Ensure to set Azure and M365 credentials in your environment variables safely. For example if you are using GitHub as your source code repository. For more information, see [Github Secrets](https://docs.github.com/en/actions/reference/encrypted-secrets).
-## Publish Teams app using Teams Developer Portal
+## Create Azure service principals
+
+To provision and deploy resources targeting Azure inside CI/CD, you must create an Azure service principal for use.
+Perform the following steps to create Azure service principals:
+1. Register an Azure AD application in single tenant.
+2. Assign a role to your Azure AD application to access your Azure subscription, and `Contributor` role is recommended.
+3. Create a new Azure AD application secret.
+
+> [!TIP]
+> Save your tenant id, application id(AZURE_SERVICE_PRINCIPAL_NAME), and the secret(AZURE_SERVICE_PRINCIPAL_PASSWORD) for future use.
+
+For more information, see [Azure service principals guidelines](/azure/active-directory/develop/howto-create-service-principal-portal). The following are the three ways to create service principal:
+* [Azure portal](/azure/active-directory/develop/howto-create-service-principal-portal)
+* [PowerShell](/azure/active-directory/develop/howto-authenticate-service-principal-powershell)
+* [Azure CLI](/cli/azure/create-an-azure-service-principal-azure-cli)
+
+## Publish Teams app using Teams Developer Portal
If there's any changes related to Teams app's manifest file, you may want to publish the Teams app again to update the manifest. To publish Teams app manually, you may leverage [Developer Portal for Teams](https://dev.teams.microsoft.com/home).
-**To publish your app**
-
-1. Sign in [Developer Portal for Teams](https://dev.teams.microsoft.com) using the corresponding account.
+Perform the following steps to publish your app:
+1. Sign in to [Developer portal for Teams](https://dev.teams.microsoft.com) using the corresponding account.
2. Import your app package in zip by selecting `App -> Import app -> Replace`.
-3. Select the target app in app list, and you will go to the overview page.
+3. Select the target app in app list.
4. Publish your app by selecting `Publish -> Publish to your org` ### See also
To publish Teams app manually, you may leverage [Developer Portal for Teams](htt
* [Quick Start for GitHub Actions](https://docs.github.com/en/actions/quickstart#creating-your-first-workflow) * [Create your first Azure DevOps Pipeline](/azure/devops/pipelines/create-first-pipeline) * [Create your first Jenkins Pipeline](https://www.jenkins.io/doc/pipeline/tour/hello-world/)
+* [Manage your apps with the Developer Portal for Microsoft Teams](/concepts/build-and-test/teams-developer-portal)
platform Whats New https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/whats-new.md
Discover Microsoft Teams platform features that are generally available (GA) and
| Date | Update | Find here | | | | |
+|01/10/2022 | Teams Toolkit for Visual Studio Code | Tools and SDKs > Teams Toolkit for Visual Studio Code > [Teams Toolkit fundamentals](toolkit/teams-toolkit-fundamentals.md) |
|12/24/2021| Introduced step-by-step guide to grant Tab device permissions. | App fundamentals > Device capabilities > [step-by-step guide to grant Tab device permissions](sbs-tab-device-permissions.yml) | |12/23/2021| Introduced step-by-step guide to create Tabs with Adaptive Cards.| Add authentication > Tabs > Use SSO authentication > [Step-by-step guide to create Tabs with Adaptive Cards](sbs-tab-with-adaptive-cards.yml) | | 12/21/2021 | Updated the Get started JavaScript, C#, and Node.js modules for Teams Toolkit 3.0.0. | ΓÇó Get started > [Build your first app with JavaScript](sbs-gs-javascript.yml) <br> ΓÇó Get started > [Build your first app with C# or .NET](sbs-gs-csharp.yml) <br> ΓÇó Get started> [Build your first app with Node.js](sbs-gs-nodejs.yml) |
Developer preview is a public program that provides early access to unreleased T
| **Date** | **Update** | **Find here** | | -- | | |
+|01/10/2022 | Teams Toolkit for Visual Studio Code | Tools and SDKs > Teams Toolkit for Visual Studio Code > [Teams Toolkit fundamentals](toolkit/teams-toolkit-fundamentals.md) |
|12/24/2021| Introduced step-by-step guide to grant Tab device permissions. | App fundamentals > Device capabilities > [step-by-step guide to grant Tab device permissions](sbs-tab-device-permissions.yml) |
-|11/30/2021 | Teams Toolkit for Visual Studio Code | Tools and SDKs > Teams Toolkit for Visual Studio Code > [Teams Toolkit fundamentals](toolkit/teams-toolkit-fundamentals.md) |
|11/15/2021| Personal tabs and messaging extensions run in Outlook and Office | [Extend Teams apps across Microsoft 365](~/m365-apps/overview.md) | |10/28/2021|Bots can be enabled to receive all channel messages using resource-specific consent (RSC).| ΓÇó Build bots > Bot conversations > Messages in bot conversations > [Receive all messages with RSC](~/bots/how-to/conversations/channel-messages-with-rsc.md) </br> ΓÇó Build bots > Bot conversations > [bot conversation overview](~/bots/how-to/conversations/conversation-basics.md) </br> ΓÇó Build bots > Bot conversations > [channel and group conversations](~/bots/how-to/conversations/channel-and-group-conversations.md) </br> ΓÇó App manifest > Public developer preview > [developer preview manifest schema](~/resources/schem) | |10/19/2021|Device permissions for the browser.| App fundamentals > Device capabilities > [Device permissions for the browser](concepts/device-capabilities/browser-device-permissions.md) |