
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
tfx-migration-helper
Advanced tools
CLI to reduce manual steps to migrate samples to TeamsFX V3.
Install the CLI
npm install tfx-migration-helper -g
cd to the root folder of the project to be migrated
Run migration command:
tfxm migrate -t <app-type> -n <app-name>
e.g.
tfxm migrate -t tab -n personal-tab
Use https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3/samples/tab-ui-templates/ts as example, the steps are:
tfxm migrate -t tab -n tab-ui-templates./src/manifest/manifest.jsonnpm install --save-dev env-cmd"dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start",
"start": "react-scripts start",
Use https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3/samples/tab-sso/nodejs as example, the steps are:
Run tfxm migrate -t tab-sso -n tab-sso
Update .gitignore: copy or append content from .gitignore.example
Update placeholder in manifest.json
Update package.json, add 'dev:teamsfx' in 'scripts' section:
"dev:teamsfx": "npm run start",
Add redirect url in replyUrlsWithType of aad.manifest.json
{
"url": "${{TAB_ENDPOINT}}/auth-end",
"type": "Spa"
},
{
"url": "${{TAB_ENDPOINT}}/Home/BrowserRedirect",
"type": "Spa"
},
Use https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3/samples/bot-conversation/nodejs as example, the steps are:
tfxm migrate -t bot -n bot-conversation"dev:teamsfx": "npm run dev",
"dev": "nodemon --inspect=9239 --signal SIGINT ./index.js",
Use https://github.com/formulahendry/Microsoft-Teams-Samples/blob/junhan/v3/samples/bot-conversation-sso-quickstart/js/ as example, the steps are:
tfxm migrate -t bot-sso -n bot-conversation-sso-quickstart"dev:teamsfx": "npm run dev",
"dev": "nodemon --inspect=9239 --signal SIGINT ./index.js",
Use https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-action-quickstart/js as example, the steps are:
tfxm migrate -t bot -n msgext-action-quickstart"dev:teamsfx": "npm run dev",
"dev": "nodemon --inspect=9239 --signal SIGINT ./index.js",
- uses: file/createOrUpdateEnvironmentFile
with:
target: ./.env
envs:
BotId: ${{AAD_APP_CLIENT_ID}}
BotPassword: ${{SECRET_AAD_APP_CLIENT_SECRET}}
Use https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3/samples/msgext-search-sso-config/nodejs as example, the steps are:
tfxm migrate -t bot-sso -n msgext-search-sso-config"dev:teamsfx": "npm run dev",
"dev": "nodemon --inspect=9239 --signal SIGINT ./index.js",
- uses: file/createOrUpdateEnvironmentFile
with:
target: ./.env
envs:
MicrosoftAppId: ${{AAD_APP_CLIENT_ID}}
MicrosoftAppPassword: ${{SECRET_AAD_APP_CLIENT_SECRET}}
connectionName: ${{CONNECTION_NAME}}
SiteUrl: ${{BOT_ENDPOINT}}
Use https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-hello-world/nodejs as example, the steps are:
tfxm migrate -t bot -n app-hello-world"dev:teamsfx": "npm run dev",
"dev": "nodemon --exec babel-node --inspect=9239 --signal SIGINT src/app.js",
# Generate runtime environment variables
- uses: file/createOrUpdateEnvironmentFile
with:
target: ./.env
envs:
PORT: 3978
- uses: file/createOrUpdateJsonFile
with:
target: ./config/default.json # Required. The relative path of settings file
appsettings: # Required. The appsettings to be generated
bot:
appId: ${{AAD_APP_CLIENT_ID}}
appPassword: ${{SECRET_AAD_APP_CLIENT_SECRET}}
const ENV_FILE = path.join(__dirname, '..', '.env');
Use https://github.com/formulahendry/yo-teams-migration/tree/main/tab as example, the steps are:
tfxm migrate -t tab -n tab"dev:teamsfx": "gulp serve --debug --no-schema-validation",
"endsPattern": "Server running on"# Run npm command
- uses: cli/runNpmCommand
with:
args: install --no-audit
# Generate runtime environment variables
- uses: file/createOrUpdateEnvironmentFile
with:
target: ./.env
envs:
PORT: 53000
Use https://github.com/formulahendry/yo-teams-migration/tree/main/tab-sso as example, the steps are:
tfxm migrate -t tab-sso -n tab-sso"dev:teamsfx": "gulp serve --debug --no-schema-validation",
"endsPattern": "Server running on"# Generate runtime environment variables
- uses: file/createOrUpdateEnvironmentFile
with:
target: ./.env
envs:
PORT: 53000
TAB_APP_ID: ${{AAD_APP_CLIENT_ID}}
TAB_APP_URI: api://${{TAB_DOMAIN}}/${{AAD_APP_CLIENT_ID}}
Use https://github.com/formulahendry/yo-teams-migration/tree/main/bot as example, the steps are:
tfxm migrate -t bot -n bot"dev:teamsfx": "gulp serve --debug --no-schema-validation",
"endsPattern": "Server running on"# Generate runtime environment variables
- uses: file/createOrUpdateEnvironmentFile
with:
target: ./.env
envs:
PORT: 3978
MICROSOFT_APP_ID: ${{AAD_APP_CLIENT_ID}}
MICROSOFT_APP_PASSWORD: ${{SECRET_AAD_APP_CLIENT_SECRET}}
Use https://github.com/formulahendry/yo-teams-migration/tree/main/tab+bot as example, the steps are same as Bot (yo teams).
Use https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3-dotnet/samples/tab-personal/mvc-csharp as example, the steps are:
tfxm migrate -t tab-csharp -n tab-personal in the folder which contains the .csproj file./AppManifest/manifest.jsonUse https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3-dotnet/samples/tab-personal-sso-quickstart/csharp_dotnetcore as example, the steps are:
tfxm migrate -t tab-sso-csharp -n tab-personal-sso-quickstart in the folder which contains the .csproj file./Manifest/manifest.jsonUse https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3-dotnet/samples/bot-conversation/csharp as example, the steps are:
tfxm migrate -t bot-csharp -n bot-conversation in the folder which contains the .csproj file./TeamsAppManifest/manifest.jsonUse https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3-dotnet/samples/bot-conversation-sso-quickstart/csharp_dotnetcore as example, the steps are:
tfxm migrate -t bot-sso-csharp -n bot-conversation-sso-quickstart in the folder which contains the .csproj fileThe steps are similar to Bot (C#). For some ME projects that have BaseUrl in appsettings.json, you just need to add BaseUrl: ${{BOT_ENDPOINT}} in teamsapp.local.yml like below:
# Generate runtime appsettings to JSON file
- uses: file/createOrUpdateJsonFile
with:
target: ./appsettings.json
content:
MicrosoftAppId: ${{AAD_APP_CLIENT_ID}}
MicrosoftAppPassword: ${{SECRET_AAD_APP_CLIENT_SECRET}}
MicrosoftAppType: ${{MICROSOFT_APP_TYPE}}
MicrosoftAppTenantId: ${{MICROSOFT_APP_TENANT_ID}}
BaseUrl: ${{BOT_ENDPOINT}}
The steps are similar to Bot SSO (C#). For some ME SSO projects that have SiteUrl in appsettings.json, you just need to add SiteUrl: ${{BOT_ENDPOINT}} in teamsapp.local.yml like below:
# Generate runtime appsettings to JSON file
- uses: file/createOrUpdateJsonFile
with:
target: ./appsettings.json
content:
MicrosoftAppId: ${{AAD_APP_CLIENT_ID}}
MicrosoftAppPassword: ${{SECRET_AAD_APP_CLIENT_SECRET}}
ConnectionName: ${{CONNECTION_NAME}}
MicrosoftAppType: ${{MICROSOFT_APP_TYPE}}
MicrosoftAppTenantId: ${{MICROSOFT_APP_TENANT_ID}}
SiteUrl: ${{BOT_ENDPOINT}}
FAQs
CLI to reduce manual steps to migrate samples to TeamsFX V3.
We found that tfx-migration-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.