-
Notifications
You must be signed in to change notification settings - Fork 195
ZZZ ‐ [Archived] ‐ Enable Preview Features in Teams Toolkit
Following content applies to VS Code Teams Toolkit v2.8.0+ and TeamsFx CLI v0.7.0+. You can find content for older tooling versions in page history.
Please be advised these features are currently under active development, with a lot of changes taking place. Please expect breaking changes as we continue to iterate. We really appreciate your feedback! If you encounter any issue or error, please report issues to us here.
- Upgrade to the latest Teams Toolkit.
- Open Visual Studio Code and find
Manage
icon from sidebar (Bottom Left) - Select
Settings
and findTeams Toolkit
underExtensions
section. - Tick the checkbox for
Insider Preview
setting. - Restart Visual Studio Code.
Note: If you enabled
Provision Azure Resources with ARM Template
preview feature, you need to tick the checkbox forInsider Preview
again to continue use this preview feature.
- Upgrade to the latest TeamsFx CLI.
- Set
TEAMSFX_INSIDER_PREVIEW
environment variable totrue
(either globally or for current shell)
Teams Toolkit provides seamless integration with Azure resources, and we integrate with ARM so that you can now declaratively provision Azure resources your application needs using infrastructure as code approach using Bicep as a domain-specific language (DSL) to author Azure Resource Manager template.
Please note following support is still in progress now, please stay tuned.
- Add APIM
If you want to customize the ARM template, just update the bicep files at templates/azure
and Azure parameter files at .fx/configs
, then trigger provision command again to provision with your customized ARM template.
The Azure parameter file supports referencing values from environment variable. Just put {{YOUR_ENV_NAME}}
to the value part, and our tooling will replace it with actual value. There're also some predefined placeholders in the parameter file. We're working to provide more detailed documents for you. Please stay tuned.
Knwown issues
- When adding resource, the
.fx/azure.parameters.{env}.json
will also be regenerated, which will change the resource name being provisioned. Please go totemplates/azure/backup/{timestamp}/parameters/
folder and copy the value ofresourceBaseName
as well as other customized content to the new file to ensure the tooling functions well. We're working on features to avoid regenerating these files.
The Teams toolkit provide a simple way for developers to easily create multiple environments and deploy artifacts to a target environment for a Teams app.
By default, the toolkit generates:
- a
local
environment to represent your local machine environment configurations. - a
dev
environment after creating a new project to represent a remote environment configurations.
To add another remote environment for the app, you can use the Teams: Create new environment copy
command in the tree view:
And then input your new environment name:
If you have more than one existing environments, you will need to select an existing environment to create the environment copy. Behind the scenes, the file content of config.<newEnv>.json
and azure.parameters.<newEnv>.json
will be copied from the existing environment you selected.
The toolkit provides the flexibility to let users customize the resource provision behavior for an environment.
Here is some common scenarios we can support for customized provision:
Scenarios | Where to customize |
---|---|
Azure Resource Customization |
|
App Manifest |
|
Reusing existing Microsoft Entra app for Teams app |
|
Reusing existing Microsoft Entra app for bot |
|
Skip add user when provision SQL |
|
- For how to use the environment config file, you can refer to the environment configuration schema.
- For how to use BICEP files in Teams toolkit, you can refer to official BICEP document for help.
As we introduce multi-environments concept in Teams toolkit, for all environment related operations, you will need to select a target environment to perform with. The toolkit will prompt and ask for a target environment when needed.
Main changes in project's folder structure:
-
.fx/configs
: config 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. -
projectSettings.json
: global project settings which apply to all environments. -
localSettings.json
: local debug configuration file.
-
-
.fx/publishProfiles
: provision result that generated by the Toolkit. -
templates
-
appPackage
: app manifest template files. -
azure
: BICEP template files.
-
Happy coding!
Previous version of Teams Toolkit is not easy for multiple users to develop the same project due to missing privilege to access Teams APP and Microsoft Entra APP. If multiple developers want to share remote resources and work together, they need to manually handle permissions of Teams App and Microsoft Entra APP which need deep understanding the low-level details about the TeamsFx project.
Teams Toolkit now natively support add other collaborators for TeamsFx project which is much easy and straightforward for collaborative development.
-
To use collaboration feature, you need to login M365 and Azure account and your TeamsFx project should be provisioned first
-
In the Teams Toolkit panel, click Environment, and expand an environment name, there will be a Collaborators node
-
Click grant permission button on the right side of Collaborators node, then you can add another M365 account email address as collaborator
-
Now collaborator with the added account can develop, provision and deploy the project
-
Open VSCode, create a new TeamsFx Tab project (You can also select bot), and the hosting type select Azure
-
Login M365 account and Azure account
-
Provision and deploy your project, after provision success, you will see your m365 account listing below Collaborators node in Teams Toolkit panel
-
Add another account as collaborator from tree view by click the grant permission button. Note that the added account must under the same tenant
-
Push your project to GitHub
- Clone the project from GitHub
- Login M365 account use collaborator’s account
- Login Azure account which has contributor permission for all the Azure resources
- Update Tab code, and deploy the project to remote
- Launch remote and the project should work fine
Teams Toolkit CLI provides teamsFx permission
Commands for collaboration scenario.
teamsFx permission Commands |
Descriptions |
---|---|
teamsfx permission grant |
Grant permission for collaborator's M365 account for the project |
teamsfx permission status |
Show permission status for the project |
-
(Required) Provide env name.
-
(Required) Provide collaborator's M365 email address. Note that the collaborators's account should be in the same tenant with creator.
-
(Required) Provide env name.
-
With this flag, Teams Toolkit CLI will print out all collaborators for this project.
Here are some examples for you to better handling permission for TeamsFx
projects.
teamsfx permission grant --env dev --email [email protected]
teamsfx permission status --env dev
teamsfx permission status --env dev --list-all-collaborators
Azure related permissions should be handled manually by the Azure subscription administrator via Azure portal, different Azure account should at least have contributor role for the subscription so that developers can work together to provision and deploy TeamsFx project
Build Custom Engine Copilots
- Build a basic AI chatbot for Teams
- Build an AI agent chatbot for Teams
- Expand AI bot's knowledge with your content
Scenario-based Tutorials
- Send notifications to Teams
- Respond to chat commands in Teams
- Respond to card actions in Teams
- Embed a dashboard canvas in Teams
Extend your app across Microsoft 365
- Teams tabs in Microsoft 365 and Outlook
- Teams message extension for Outlook
- Add Outlook Add-in to a Teams app
App settings and Microsoft Entra Apps
- Manage Application settings with Teams Toolkit
- Manage Microsoft Entra Application Registration with Teams Toolkit
- Use an existing Microsoft Entra app
- Use a multi-tenant Microsoft Entra app
Configure multiple capabilities
- How to configure Tab capability within your Teams app
- How to configure Bot capability within your Teams app
- How to configure Message Extension capability within your Teams app
Add Authentication to your app
- How to add single sign on in Teams Toolkit for Visual Studio Code
- How to enable Single Sign-on in Teams Toolkit for Visual Studio
Connect to cloud resources
- How to integrate Azure Functions with your Teams app
- How to integrate Azure API Management
- Integrate with Azure SQL Database
- Integrate with Azure Key Vault
Deploy apps to production