From dc6b9e53041ad4238ff3db21953dae80701c653c Mon Sep 17 00:00:00 2001 From: Mehak Bindra Date: Tue, 16 Sep 2025 18:14:02 -0700 Subject: [PATCH 1/4] ts config changes basic and oauth --- .../configs/atk/basic/typescript/env/.env.dev | 6 +- .../atk/basic/typescript/infra/azure.bicep | 39 +++++------- .../infra/azure.parameters.json.hbs | 9 +++ .../infra/botRegistration/azurebot.bicep | 12 ++-- .../atk/basic/typescript/teamsapp.yml.hbs | 47 +++++++++++--- .../configs/atk/oauth/typescript/env/.env.dev | 16 +++++ .../atk/oauth/typescript/infra/azure.bicep | 38 +++++------- .../oauth/typescript/infra/azure.local.bicep | 2 + .../infra/azure.parameters.json.hbs | 3 + .../infra/azure.parameters.local.json.hbs | 3 + .../infra/botRegistration/azurebot.bicep | 3 + .../atk/oauth/typescript/teamsapp.yml.hbs | 2 - .../configs/atk/oauth/typescript/web.config | 61 +++++++++++++++++++ .../cli/templates/typescript/ai/src/index.ts | 2 +- .../templates/typescript/echo/src/index.ts | 2 +- .../templates/typescript/graph/src/index.ts | 10 ++- .../cli/templates/typescript/tab/src/index.ts | 2 +- 17 files changed, 187 insertions(+), 70 deletions(-) create mode 100644 packages/cli/configs/atk/oauth/typescript/env/.env.dev create mode 100644 packages/cli/configs/atk/oauth/typescript/web.config diff --git a/packages/cli/configs/atk/basic/typescript/env/.env.dev b/packages/cli/configs/atk/basic/typescript/env/.env.dev index 12a81f257..5e12c5c06 100644 --- a/packages/cli/configs/atk/basic/typescript/env/.env.dev +++ b/packages/cli/configs/atk/basic/typescript/env/.env.dev @@ -10,8 +10,10 @@ AZURE_RESOURCE_GROUP_NAME= RESOURCE_SUFFIX= # Generated during provision, you can also add your own variables. -BOT_ID= TEAMS_APP_ID= +TEAMS_APP_TENANT_ID= +BOT_ID= +AAD_APP_OBJECT_ID= +AAD_APP_TENANT_ID= BOT_AZURE_APP_SERVICE_RESOURCE_ID= BOT_DOMAIN= -BOT_TENANT_ID= diff --git a/packages/cli/configs/atk/basic/typescript/infra/azure.bicep b/packages/cli/configs/atk/basic/typescript/infra/azure.bicep index 35ee87a75..469d5d70a 100644 --- a/packages/cli/configs/atk/basic/typescript/infra/azure.bicep +++ b/packages/cli/configs/atk/basic/typescript/infra/azure.bicep @@ -3,21 +3,23 @@ @description('Used to generate names for all resources in this file') param resourceBaseName string +@description('Required when create Azure Bot service') +param botAadAppClientId string + +@secure() +@description('Required by Bot Framework package in your bot project') +param botAadAppClientSecret string + param webAppSKU string +param tenantId string @maxLength(42) param botDisplayName string param serverfarmsName string = resourceBaseName param webAppName string = resourceBaseName -param identityName string = resourceBaseName param location string = resourceGroup().location -resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { - location: location - name: identityName -} - // Compute resources for your Web App resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = { kind: 'app' @@ -41,7 +43,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { appSettings: [ { name: 'WEBSITE_RUN_FROM_PACKAGE' - value: '1' // Run Azure App Service from a package file + value: '1' // Run Azure APP Service from a package file } { name: 'WEBSITE_NODE_DEFAULT_VERSION' @@ -53,26 +55,20 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'CLIENT_ID' - value: identity.properties.clientId + value: botAadAppClientId } { - name: 'TENANT_ID' - value: identity.properties.tenantId + name: 'CLIENT_SECRET' + value: botAadAppClientSecret } { - name: 'BOT_TYPE' - value: 'UserAssignedMsi' + name: 'TENANT_ID' + value: tenantId } ] ftpsState: 'FtpsOnly' } } - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${identity.id}': {} - } - } } // Register your web service as a bot with the Bot Framework @@ -80,16 +76,13 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' params: { resourceBaseName: resourceBaseName - identityClientId: identity.properties.clientId - identityResourceId: identity.id - identityTenantId: identity.properties.tenantId + botAadAppClientId: botAadAppClientId botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName + tenantId: tenantId } } // The output will be persisted in .env.{envName}. Visit https://aka.ms/teamsfx-actions/arm-deploy for more details. output BOT_AZURE_APP_SERVICE_RESOURCE_ID string = webApp.id output BOT_DOMAIN string = webApp.properties.defaultHostName -output BOT_ID string = identity.properties.clientId -output BOT_TENANT_ID string = identity.properties.tenantId diff --git a/packages/cli/configs/atk/basic/typescript/infra/azure.parameters.json.hbs b/packages/cli/configs/atk/basic/typescript/infra/azure.parameters.json.hbs index 7b5ba26e9..0428469d4 100644 --- a/packages/cli/configs/atk/basic/typescript/infra/azure.parameters.json.hbs +++ b/packages/cli/configs/atk/basic/typescript/infra/azure.parameters.json.hbs @@ -8,6 +8,15 @@ "webAppSKU": { "value": "B1" }, + "botAadAppClientId": { + "value": "$\{{BOT_ID}}" + }, + "botAadAppClientSecret": { + "value": "$\{{SECRET_BOT_PASSWORD}}" + }, + "tenantId": { + "value": "$\{{AAD_APP_TENANT_ID}}" + }, "botDisplayName": { "value": "{{ toPascalCase name }}Infra" } diff --git a/packages/cli/configs/atk/basic/typescript/infra/botRegistration/azurebot.bicep b/packages/cli/configs/atk/basic/typescript/infra/botRegistration/azurebot.bicep index a5a27b8fe..1627e0dfa 100644 --- a/packages/cli/configs/atk/basic/typescript/infra/botRegistration/azurebot.bicep +++ b/packages/cli/configs/atk/basic/typescript/infra/botRegistration/azurebot.bicep @@ -8,10 +8,9 @@ param botDisplayName string param botServiceName string = resourceBaseName param botServiceSku string = 'F0' -param identityResourceId string -param identityClientId string -param identityTenantId string +param botAadAppClientId string param botAppDomain string +param tenantId string // Register your web service as a bot with the Bot Framework resource botService 'Microsoft.BotService/botServices@2021-03-01' = { @@ -21,10 +20,9 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { properties: { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' - msaAppId: identityClientId - msaAppMSIResourceId: identityResourceId - msaAppTenantId:identityTenantId - msaAppType:'UserAssignedMSI' + msaAppId: botAadAppClientId + msaAppType: 'SingleTenant' + msaAppTenantId: tenantId } sku: { name: botServiceSku diff --git a/packages/cli/configs/atk/basic/typescript/teamsapp.yml.hbs b/packages/cli/configs/atk/basic/typescript/teamsapp.yml.hbs index e25f863fb..32c5e4556 100644 --- a/packages/cli/configs/atk/basic/typescript/teamsapp.yml.hbs +++ b/packages/cli/configs/atk/basic/typescript/teamsapp.yml.hbs @@ -20,25 +20,52 @@ provision: writeToEnvironmentFile: teamsAppId: TEAMS_APP_ID - # Automates the creation an Azure AD app registration which is required for a bot. - # The Bot ID (AAD app client ID) and Bot Password (AAD app client secret) are saved to an environment file. - - uses: botAadApp/create + # Creates a new Microsoft Entra app to authenticate users if + # the environment variable that stores clientId is empty + - uses: aadApp/create with: name: {{ toPascalCase name }}$\{{APP_NAME_SUFFIX}} + # Note: when you run aadApp/update, the Microsoft Entra app name will be updated + # based on the definition in manifest. If you don't want to change the + # name, make sure the name in Microsoft Entra manifest is the same with the name + # defined here. + # If the value is false, the driver will not generate client secret for you + generateClientSecret: true + # organization's Microsoft Entra tenant (for example, single tenant). + signInAudience: AzureADMultipleOrgs + # Write the information of created resources into environment file for the + # specified environment variable(s). writeToEnvironmentFile: - botId: BOT_ID - botPassword: SECRET_BOT_PASSWORD + clientId: BOT_ID + # Environment variable that starts with `SECRET_` will be stored to the + # .env.{envName}.user environment file + clientSecret: SECRET_BOT_PASSWORD + objectId: AAD_APP_OBJECT_ID + tenantId: AAD_APP_TENANT_ID - # Automates the creation of infrastructure defined in ARM templates to host the bot. - # The created resource IDs are saved to an environment file. - - uses: arm/deploy + - uses: arm/deploy # Deploy given ARM templates parallelly. with: + # AZURE_SUBSCRIPTION_ID is a built-in environment variable, + # if its value is empty, TeamsFx will prompt you to select a subscription. + # Referencing other environment variables with empty values + # will skip the subscription selection prompt. subscriptionId: $\{{AZURE_SUBSCRIPTION_ID}} + # AZURE_RESOURCE_GROUP_NAME is a built-in environment variable, + # if its value is empty, TeamsFx will prompt you to select or create one + # resource group. + # Referencing other environment variables with empty values + # will skip the resource group selection prompt. resourceGroupName: $\{{AZURE_RESOURCE_GROUP_NAME}} templates: - - path: ./infra/azure.bicep + - path: ./infra/azure.bicep # Relative path to this file + # Relative path to this yaml file. + # Placeholders will be replaced with corresponding environment + # variable before ARM deployment. parameters: ./infra/azure.parameters.json - deploymentName: Create-resources-for-tab + # Required when deploying ARM template + deploymentName: Create-resources-for-bot + # M365 Agents Toolkit will download this bicep CLI version from github for you, + # will use bicep CLI in PATH if you remove this config. bicepCliVersion: v0.9.1 # Optional: Automates schema and error checking of the Teams app manifest and outputs the results in the console. diff --git a/packages/cli/configs/atk/oauth/typescript/env/.env.dev b/packages/cli/configs/atk/oauth/typescript/env/.env.dev new file mode 100644 index 000000000..7bc662ca9 --- /dev/null +++ b/packages/cli/configs/atk/oauth/typescript/env/.env.dev @@ -0,0 +1,16 @@ +# Built-in environment variables +TEAMSFX_ENV=dev +APP_NAME_SUFFIX=dev + +# Updating AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP_NAME after provision may also require an update to RESOURCE_SUFFIX, because some services require a globally unique name across subscriptions/resource groups. +AZURE_SUBSCRIPTION_ID= +AZURE_RESOURCE_GROUP_NAME= +RESOURCE_SUFFIX= + +TEAMS_APP_ID= +TEAMS_APP_TENANT_ID= +BOT_ID= +AAD_APP_OBJECT_ID= +AAD_APP_TENANT_ID= +BOT_AZURE_APP_SERVICE_RESOURCE_ID= +BOT_DOMAIN= diff --git a/packages/cli/configs/atk/oauth/typescript/infra/azure.bicep b/packages/cli/configs/atk/oauth/typescript/infra/azure.bicep index 2e0bd6839..2771a31a7 100644 --- a/packages/cli/configs/atk/oauth/typescript/infra/azure.bicep +++ b/packages/cli/configs/atk/oauth/typescript/infra/azure.bicep @@ -3,6 +3,13 @@ @description('Used to generate names for all resources in this file') param resourceBaseName string +@description('Required when create Azure Bot service') +param botAadAppClientId string + +@secure() +@description('Required by Bot Framework package in your bot project') +param botAadAppClientSecret string + param webAppSKU string @maxLength(42) @@ -10,14 +17,9 @@ param botDisplayName string param serverfarmsName string = resourceBaseName param webAppName string = resourceBaseName -param identityName string = resourceBaseName param location string = resourceGroup().location param oauthConnectionName string - -resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { - location: location - name: identityName -} +param tenantId string // Compute resources for your Web App resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = { @@ -53,31 +55,21 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { value: '1' } { - name: 'BOT_ID' - value: identity.properties.clientId + name: 'CLIENT_ID' + value: botAadAppClientId } { - name: 'BOT_TENANT_ID' - value: identity.properties.tenantId - } - { - name: 'BOT_TYPE' - value: 'UserAssignedMsi' + name: 'CLIENT_SECRET' + value: botAadAppClientSecret } { - name: 'OAUTH_CONNECTION_NAME' - value: oauthConnectionName + name: 'TENANT_ID' + value: tenantId } ] ftpsState: 'FtpsOnly' } } - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${identity.id}': {} - } - } } // Register your web service as a bot with the Bot Framework @@ -86,9 +78,11 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { params: { resourceBaseName: resourceBaseName botAadAppClientId: botAadAppClientId + botAddAppClientSecret: botAadAppClientSecret botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName oauthConnectionName: oauthConnectionName + tenantId: tenantId } } diff --git a/packages/cli/configs/atk/oauth/typescript/infra/azure.local.bicep b/packages/cli/configs/atk/oauth/typescript/infra/azure.local.bicep index 5060a2b3e..3579b84c6 100644 --- a/packages/cli/configs/atk/oauth/typescript/infra/azure.local.bicep +++ b/packages/cli/configs/atk/oauth/typescript/infra/azure.local.bicep @@ -15,6 +15,7 @@ param botDisplayName string param botAppDomain string param oauthConnectionName string +param tenantId string module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' @@ -25,5 +26,6 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { botDisplayName: botDisplayName botAddAppClientSecret: botAadAppClientSecret oauthConnectionName: oauthConnectionName + tenantId: tenantId } } diff --git a/packages/cli/configs/atk/oauth/typescript/infra/azure.parameters.json.hbs b/packages/cli/configs/atk/oauth/typescript/infra/azure.parameters.json.hbs index 5a3b96b65..adb44433f 100644 --- a/packages/cli/configs/atk/oauth/typescript/infra/azure.parameters.json.hbs +++ b/packages/cli/configs/atk/oauth/typescript/infra/azure.parameters.json.hbs @@ -19,6 +19,9 @@ }, "oauthConnectionName": { "value": "$\{{OAUTH_CONNECTION_NAME}}" + }, + "tenantId": { + "value": "$\{{AAD_APP_TENANT_ID}}" } } } diff --git a/packages/cli/configs/atk/oauth/typescript/infra/azure.parameters.local.json.hbs b/packages/cli/configs/atk/oauth/typescript/infra/azure.parameters.local.json.hbs index aab918913..eae4d85c0 100644 --- a/packages/cli/configs/atk/oauth/typescript/infra/azure.parameters.local.json.hbs +++ b/packages/cli/configs/atk/oauth/typescript/infra/azure.parameters.local.json.hbs @@ -19,6 +19,9 @@ }, "oauthConnectionName": { "value": "$\{{OAUTH_CONNECTION_NAME}}" + }, + "tenantId": { + "value": "$\{{AAD_APP_TENANT_ID}}" } } } diff --git a/packages/cli/configs/atk/oauth/typescript/infra/botRegistration/azurebot.bicep b/packages/cli/configs/atk/oauth/typescript/infra/botRegistration/azurebot.bicep index 46e65feb5..4e3258df3 100644 --- a/packages/cli/configs/atk/oauth/typescript/infra/botRegistration/azurebot.bicep +++ b/packages/cli/configs/atk/oauth/typescript/infra/botRegistration/azurebot.bicep @@ -11,6 +11,7 @@ param botServiceSku string = 'F0' param botAadAppClientId string param botAppDomain string param oauthConnectionName string +param tenantId string @secure() param botAddAppClientSecret string @@ -24,6 +25,8 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' msaAppId: botAadAppClientId + msaAppType: 'SingleTenant' + msaAppTenantId: tenantId } sku: { name: botServiceSku diff --git a/packages/cli/configs/atk/oauth/typescript/teamsapp.yml.hbs b/packages/cli/configs/atk/oauth/typescript/teamsapp.yml.hbs index d57b91e6c..4227094c3 100644 --- a/packages/cli/configs/atk/oauth/typescript/teamsapp.yml.hbs +++ b/packages/cli/configs/atk/oauth/typescript/teamsapp.yml.hbs @@ -42,8 +42,6 @@ provision: clientSecret: SECRET_BOT_PASSWORD objectId: AAD_APP_OBJECT_ID tenantId: AAD_APP_TENANT_ID - authority: AAD_APP_OAUTH_AUTHORITY - authorityHost: AAD_APP_OAUTH_AUTHORITY_HOST # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in # manifest file to determine which Microsoft Entra app to update. diff --git a/packages/cli/configs/atk/oauth/typescript/web.config b/packages/cli/configs/atk/oauth/typescript/web.config new file mode 100644 index 000000000..806357751 --- /dev/null +++ b/packages/cli/configs/atk/oauth/typescript/web.config @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/cli/templates/typescript/ai/src/index.ts b/packages/cli/templates/typescript/ai/src/index.ts index 9513b8f49..643555128 100644 --- a/packages/cli/templates/typescript/ai/src/index.ts +++ b/packages/cli/templates/typescript/ai/src/index.ts @@ -25,5 +25,5 @@ app.on('message', async ({ stream, activity }) => { }); (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); diff --git a/packages/cli/templates/typescript/echo/src/index.ts b/packages/cli/templates/typescript/echo/src/index.ts index bc0d3cfe7..42c290798 100644 --- a/packages/cli/templates/typescript/echo/src/index.ts +++ b/packages/cli/templates/typescript/echo/src/index.ts @@ -11,5 +11,5 @@ app.on('message', async ({ send, activity }) => { }); (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); diff --git a/packages/cli/templates/typescript/graph/src/index.ts b/packages/cli/templates/typescript/graph/src/index.ts index fd25b9a1d..7c5c25d5e 100644 --- a/packages/cli/templates/typescript/graph/src/index.ts +++ b/packages/cli/templates/typescript/graph/src/index.ts @@ -6,8 +6,16 @@ import * as endpoints from '@microsoft/teams.graph-endpoints'; const app = new App({ plugins: [new DevtoolsPlugin()], + oauth: { defaultConnectionName: 'graph' }, }); +app.message('/signout', async ({ send, signout, isSignedIn }) => { + if (!isSignedIn) return; + await signout(); // call signout for your auth connection... + await send('you have been signed out!'); +}); + + app.on('message', async ({ log, signin, isSignedIn }) => { if (!isSignedIn) { await signin(); @@ -33,5 +41,5 @@ app.event('signin', async ({ send, userGraph }) => { }); (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); diff --git a/packages/cli/templates/typescript/tab/src/index.ts b/packages/cli/templates/typescript/tab/src/index.ts index 026af0edb..3a2d19994 100644 --- a/packages/cli/templates/typescript/tab/src/index.ts +++ b/packages/cli/templates/typescript/tab/src/index.ts @@ -28,5 +28,5 @@ app.on('message', async ({ activity, reply }) => { }); (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); From 346a6cfa3a7788ada1d42c5271384076a3654283 Mon Sep 17 00:00:00 2001 From: Mehak Bindra Date: Tue, 16 Sep 2025 18:26:12 -0700 Subject: [PATCH 2/4] ports can be strings - namedpipe --- tests/a2a/src/client-example.ts | 2 +- tests/a2a/src/server-example.ts | 2 +- tests/ai/src/index.ts | 2 +- tests/cards/src/index.ts | 2 +- tests/dialogs/src/index.ts | 2 +- tests/mcpclient/src/index.ts | 2 +- turbo/generators/templates/tests/index.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/a2a/src/client-example.ts b/tests/a2a/src/client-example.ts index 2ef014ad4..3bb9e3a50 100644 --- a/tests/a2a/src/client-example.ts +++ b/tests/a2a/src/client-example.ts @@ -105,5 +105,5 @@ app.on('message', async ({ send, activity }) => { }); (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); diff --git a/tests/a2a/src/server-example.ts b/tests/a2a/src/server-example.ts index c8683eb5e..7a7fe3ae1 100644 --- a/tests/a2a/src/server-example.ts +++ b/tests/a2a/src/server-example.ts @@ -10,7 +10,7 @@ import { OpenAIChatModel } from '@microsoft/teams.openai'; const logger = new ConsoleLogger('a2a-server', { level: 'debug' }); -const PORT = +(process.env.PORT || 4000); +const PORT = process.env.PORT || 4000; // :snippet-start: a2a-server-app-initialization-example // import { A2APlugin, schema } from "@microsoft/teams.a2a"; diff --git a/tests/ai/src/index.ts b/tests/ai/src/index.ts index 9a72801a7..a7a1e1921 100644 --- a/tests/ai/src/index.ts +++ b/tests/ai/src/index.ts @@ -180,5 +180,5 @@ app.on('message.submit.feedback', async ({ activity, log }) => { // :snippet-end: (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); diff --git a/tests/cards/src/index.ts b/tests/cards/src/index.ts index 46fc5154f..5cfbe450f 100644 --- a/tests/cards/src/index.ts +++ b/tests/cards/src/index.ts @@ -427,5 +427,5 @@ app.on('card.action', async ({ activity, send }) => { // :snippet-end: (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); diff --git a/tests/dialogs/src/index.ts b/tests/dialogs/src/index.ts index 4592fcc23..5d6798993 100644 --- a/tests/dialogs/src/index.ts +++ b/tests/dialogs/src/index.ts @@ -308,5 +308,5 @@ app.on('dialog.submit', async ({ activity, send, next }) => { // :snippet-end: (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); diff --git a/tests/mcpclient/src/index.ts b/tests/mcpclient/src/index.ts index 57254afbe..ea5abf43e 100644 --- a/tests/mcpclient/src/index.ts +++ b/tests/mcpclient/src/index.ts @@ -64,5 +64,5 @@ app.on('message', async ({ send, activity }) => { // :snippet-end: (async () => { - await app.start(+(process.env.PORT || 3002)); + await app.start(process.env.PORT || 3002); })(); diff --git a/turbo/generators/templates/tests/index.ts b/turbo/generators/templates/tests/index.ts index 4264893ef..9dd1eedd3 100644 --- a/turbo/generators/templates/tests/index.ts +++ b/turbo/generators/templates/tests/index.ts @@ -12,5 +12,5 @@ app.on('message', async ({ send, activity }) => { }); (async () => { - await app.start(+(process.env.PORT || 3978)); + await app.start(process.env.PORT || 3978); })(); From 95063875e931d03fa265a0954b425cb5d34454f6 Mon Sep 17 00:00:00 2001 From: Mehak Bindra Date: Tue, 16 Sep 2025 22:00:54 -0700 Subject: [PATCH 3/4] add ts oauth local.yml --- .../cli/configs/atk/oauth/typescript/teamsapp.local.yml.hbs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/cli/configs/atk/oauth/typescript/teamsapp.local.yml.hbs b/packages/cli/configs/atk/oauth/typescript/teamsapp.local.yml.hbs index 086ee948e..fbbedcd64 100644 --- a/packages/cli/configs/atk/oauth/typescript/teamsapp.local.yml.hbs +++ b/packages/cli/configs/atk/oauth/typescript/teamsapp.local.yml.hbs @@ -41,8 +41,6 @@ provision: clientSecret: SECRET_BOT_PASSWORD objectId: AAD_APP_OBJECT_ID tenantId: AAD_APP_TENANT_ID - authority: AAD_APP_OAUTH_AUTHORITY - authorityHost: AAD_APP_OAUTH_AUTHORITY_HOST # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in # manifest file to determine which Microsoft Entra app to update. @@ -114,5 +112,6 @@ deploy: PORT: 3978 CLIENT_ID: $\{{BOT_ID}} CLIENT_SECRET: $\{{SECRET_BOT_PASSWORD}} + TENANT_ID: $\{{AAD_APP_TENANT_ID}} # an arbitrary name for the connection OAUTH_CONNECTION_NAME: graph From 81f4a29890402a5334f46c5e5d16e3054d69404a Mon Sep 17 00:00:00 2001 From: heyitsaamir Date: Wed, 17 Sep 2025 12:34:13 -0700 Subject: [PATCH 4/4] Add venv --- packages/cli/configs/atk/basic/python/.vscode/launch.json | 1 + packages/cli/configs/atk/oauth/python/.vscode/launch.json | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/cli/configs/atk/basic/python/.vscode/launch.json b/packages/cli/configs/atk/basic/python/.vscode/launch.json index db89ec3cd..ae4591536 100644 --- a/packages/cli/configs/atk/basic/python/.vscode/launch.json +++ b/packages/cli/configs/atk/basic/python/.vscode/launch.json @@ -49,6 +49,7 @@ "name": "Start", "type": "debugpy", "request": "launch", + "python": "${workspaceFolder}/.venv/bin/python", "program": "${workspaceFolder}/src/main.py", "console": "integratedTerminal" }, diff --git a/packages/cli/configs/atk/oauth/python/.vscode/launch.json b/packages/cli/configs/atk/oauth/python/.vscode/launch.json index f30182afb..c318776b2 100644 --- a/packages/cli/configs/atk/oauth/python/.vscode/launch.json +++ b/packages/cli/configs/atk/oauth/python/.vscode/launch.json @@ -49,6 +49,7 @@ "name": "Start", "type": "debugpy", "request": "launch", + "python": "${workspaceFolder}/.venv/bin/python", "program": "${workspaceFolder}/src/main.py", "console": "integratedTerminal" }