diff --git a/packages/fx-core/src/component/deps-checker/constant/helpLink.ts b/packages/fx-core/src/component/deps-checker/constant/helpLink.ts index 9e3da8d236..05110477da 100644 --- a/packages/fx-core/src/component/deps-checker/constant/helpLink.ts +++ b/packages/fx-core/src/component/deps-checker/constant/helpLink.ts @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -// TODO: remove this link after clean the useless code. -export const defaultHelpLink = "https://aka.ms/teamsfx-envchecker-help"; export const v3DefaultHelpLink = "https://aka.ms/teamsfx-actions/devtool-install"; export const functionDepsVersionsLink = "https://aka.ms/functions-node-versions"; @@ -14,10 +12,6 @@ export const nodeInstallationLink = "https://nodejs.org"; export const dotnetDefaultHelpLink = "https://aka.ms/teamsfx-actions/devtool-install"; export const dotnetExplanationHelpLink = dotnetDefaultHelpLink; export const dotnetFailToInstallHelpLink = dotnetDefaultHelpLink; -// TODO: remove this link after clean the useless code. -export const dotnetNotSupportTargetVersionHelpLink = `${defaultHelpLink}#dotnetnotsupporttargetversion`; - -export const vxTestAppInstallHelpLink = `${defaultHelpLink}#failtoinstallteamsvideoextensibilitytestapp`; export const v3NodeNotFoundHelpLink = "https://aka.ms/teamsfx-node"; export const v3NodeNotSupportedHelpLink = "https://aka.ms/teamsfx-node"; diff --git a/packages/fx-core/src/component/deps-checker/internal/vxTestAppChecker.ts b/packages/fx-core/src/component/deps-checker/internal/vxTestAppChecker.ts index 45c8ed32df..d7f1205d3b 100644 --- a/packages/fx-core/src/component/deps-checker/internal/vxTestAppChecker.ts +++ b/packages/fx-core/src/component/deps-checker/internal/vxTestAppChecker.ts @@ -5,7 +5,7 @@ import * as path from "path"; import * as os from "os"; import { ConfigFolderName } from "@microsoft/teamsfx-api"; -import { Messages, vxTestAppInstallHelpLink } from "../constant"; +import { Messages } from "../constant"; import { DepsCheckerError, VxTestAppCheckError } from "../depsError"; import { DepsLogger } from "../depsLogger"; import { DepsTelemetry } from "../depsTelemetry"; @@ -52,10 +52,8 @@ export class VxTestAppChecker implements DepsChecker { public async resolve(installOptions?: BaseInstallOptions): Promise { if (!this.isValidInstallOptions(installOptions)) { return VxTestAppChecker.newDependencyStatusForInstallError( - new VxTestAppCheckError( - Messages.failToValidateVxTestAppInstallOptions(), - vxTestAppInstallHelpLink - ) + // documentation no longer exists, replaced with empty string. + new VxTestAppCheckError(Messages.failToValidateVxTestAppInstallOptions(), "") ); } @@ -78,7 +76,8 @@ export class VxTestAppChecker implements DepsChecker { // TODO: need to chmod to add executable permission for non-Windows OS if (!(await this.isValidInstalltion(projectInstallDir, installOptions.version))) { return VxTestAppChecker.newDependencyStatusForInstallError( - new VxTestAppCheckError(Messages.failToValidateVxTestApp(), vxTestAppInstallHelpLink) + // documentation no longer exists, replaced with empty string. + new VxTestAppCheckError(Messages.failToValidateVxTestApp(), "") ); } @@ -99,10 +98,8 @@ export class VxTestAppChecker implements DepsChecker { public async getInstallationInfo(installOptions?: BaseInstallOptions): Promise { if (!this.isValidInstallOptions(installOptions)) { return VxTestAppChecker.newDependencyStatusForInstallError( - new VxTestAppCheckError( - Messages.failToValidateVxTestAppInstallOptions(), - vxTestAppInstallHelpLink - ) + // documentation no longer exists, replaced with empty string. + new VxTestAppCheckError(Messages.failToValidateVxTestAppInstallOptions(), "") ); } diff --git a/packages/fx-core/src/component/driver/teamsApp/constants.ts b/packages/fx-core/src/component/driver/teamsApp/constants.ts index f81721565b..bcfba96005 100644 --- a/packages/fx-core/src/component/driver/teamsApp/constants.ts +++ b/packages/fx-core/src/component/driver/teamsApp/constants.ts @@ -32,7 +32,7 @@ export const CONFIGURABLE_TABS_TPL_V3: IConfigurableTab[] = [ { configurationUrl: `{{{state.${TAB_STATE_KEY}.endpoint}}}{{{state.${TAB_STATE_KEY}.indexPath}}}/config`, canUpdateConfiguration: true, - scopes: ["team", "groupchat"], + scopes: ["team", "groupChat"], }, ]; @@ -41,12 +41,12 @@ const BOT_ID_PLACEHOLDER = `{{state.${BOT_STATE_KEY}.botId}}`; export const BOTS_TPL_FOR_COMMAND_AND_RESPONSE_V3: IBot[] = [ { botId: BOT_ID_PLACEHOLDER, - scopes: ["personal", "team", "groupchat"], + scopes: ["personal", "team", "groupChat"], supportsFiles: false, isNotificationOnly: false, commandLists: [ { - scopes: ["personal", "team", "groupchat"], + scopes: ["personal", "team", "groupChat"], commands: [ { title: "helloWorld", @@ -61,7 +61,7 @@ export const BOTS_TPL_FOR_COMMAND_AND_RESPONSE_V3: IBot[] = [ export const BOTS_TPL_FOR_NOTIFICATION_V3: IBot[] = [ { botId: BOT_ID_PLACEHOLDER, - scopes: ["personal", "team", "groupchat"], + scopes: ["personal", "team", "groupChat"], supportsFiles: false, isNotificationOnly: false, }, @@ -70,12 +70,12 @@ export const BOTS_TPL_FOR_NOTIFICATION_V3: IBot[] = [ export const BOTS_TPL_V3: IBot[] = [ { botId: BOT_ID_PLACEHOLDER, - scopes: ["personal", "team", "groupchat"], + scopes: ["personal", "team", "groupChat"], supportsFiles: false, isNotificationOnly: false, commandLists: [ { - scopes: ["personal", "team", "groupchat"], + scopes: ["personal", "team", "groupChat"], commands: [ { title: "welcome", @@ -278,12 +278,12 @@ export const DEFAULT_DESCRIPTION = { export const BOTS_TPL_EXISTING_APP: IBot[] = [ { botId: "{{config.manifest.botId}}", - scopes: ["personal", "team", "groupchat"], + scopes: ["personal", "team", "groupChat"], supportsFiles: false, isNotificationOnly: false, commandLists: [ { - scopes: ["personal", "team", "groupchat"], + scopes: ["personal", "team", "groupChat"], commands: [], }, ], @@ -309,7 +309,7 @@ export const CONFIGURABLE_TABS_TPL_EXISTING_APP: IConfigurableTab[] = [ { configurationUrl: "{{config.manifest.tabConfigurationUrl}}", canUpdateConfiguration: true, - scopes: ["team", "groupchat"], + scopes: ["team", "groupChat"], }, ]; diff --git a/packages/fx-core/src/component/driver/teamsApp/utils/utils.ts b/packages/fx-core/src/component/driver/teamsApp/utils/utils.ts index 852d500693..d038c2a537 100644 --- a/packages/fx-core/src/component/driver/teamsApp/utils/utils.ts +++ b/packages/fx-core/src/component/driver/teamsApp/utils/utils.ts @@ -181,7 +181,7 @@ const includeGroupChatScope = (scopes: string[]): boolean => { export enum CommandScope { Team = "team", Personal = "personal", - GroupChat = "groupchat", + GroupChat = "groupChat", } export enum MeetingsContext { diff --git a/packages/fx-core/src/core/environmentName.ts b/packages/fx-core/src/core/environmentName.ts index 510e7caea2..452a884a2b 100644 --- a/packages/fx-core/src/core/environmentName.ts +++ b/packages/fx-core/src/core/environmentName.ts @@ -7,9 +7,6 @@ class EnvironmentNameManager { public readonly envStateNameRegex = /^state\.(?[\w\d-_]+)\.json$/i; public readonly schema = "https://aka.ms/teamsfx-env-config-schema"; - public readonly envConfigDescription = - `You can customize the TeamsFx config for different environments.` + - ` Visit https://aka.ms/teamsfx-env-config to get more info about this.`; private readonly defaultEnvName = "dev"; private readonly localEnvName = "local"; diff --git a/packages/fx-core/tests/component/driver/teamsApp/appstudioclient.test.ts b/packages/fx-core/tests/component/driver/teamsApp/appstudioclient.test.ts index 4de7902083..881e82e9f0 100644 --- a/packages/fx-core/tests/component/driver/teamsApp/appstudioclient.test.ts +++ b/packages/fx-core/tests/component/driver/teamsApp/appstudioclient.test.ts @@ -531,7 +531,7 @@ describe("App Studio API Test", () => { displayName: "fakeApp", developerName: "Teams", version: "0.0.1", - manifestVersion: "1.16", + manifestVersion: "1.17", }, }, }; @@ -1275,7 +1275,7 @@ describe("App Studio API Test", () => { appId: "fakeAppId", status: AsyncAppValidationStatus.Completed, appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", createdAt: Date(), updatedAt: Date(), validationResults: { diff --git a/packages/fx-core/tests/component/driver/teamsApp/validate.test.ts b/packages/fx-core/tests/component/driver/teamsApp/validate.test.ts index 2c8dfb4dab..f693624d60 100644 --- a/packages/fx-core/tests/component/driver/teamsApp/validate.test.ts +++ b/packages/fx-core/tests/component/driver/teamsApp/validate.test.ts @@ -508,7 +508,7 @@ describe("teamsApp/validateAppPackage", async () => { { id: "632652a7-0cf8-43c7-a65d-6a19e5822467", title: "Manifest Version is valid", - code: "The app is using manifest version '1.16'", + code: "The app is using manifest version '1.17'", } as any as IAppValidationNote, ], addInDetails: { @@ -802,7 +802,7 @@ describe("teamsApp/validateAppPackage", async () => { { id: "632652a7-0cf8-43c7-a65d-6a19e5822467", title: "Manifest Version is valid", - code: "The app is using manifest version '1.16'", + code: "The app is using manifest version '1.17'", } as any as IAppValidationNote, ], addInDetails: { @@ -1011,7 +1011,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Completed, createdAt: new Date(), updatedAt: new Date(), @@ -1020,7 +1020,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId2", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Aborted, createdAt: new Date(), updatedAt: new Date(), @@ -1041,7 +1041,7 @@ describe("teamsApp/validateWithTestCases", async () => { appValidationId: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", validationResults: { successes: [ { @@ -1130,7 +1130,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Completed, createdAt: new Date(), updatedAt: new Date(), @@ -1139,7 +1139,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId2", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.InProgress, createdAt: new Date(), updatedAt: new Date(), @@ -1175,7 +1175,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Completed, createdAt: new Date(), updatedAt: new Date(), @@ -1184,7 +1184,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId2", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Created, createdAt: new Date(), updatedAt: new Date(), @@ -1224,7 +1224,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Completed, createdAt: new Date(), updatedAt: new Date(), @@ -1233,7 +1233,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId2", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.InProgress, createdAt: new Date(), updatedAt: new Date(), @@ -1274,7 +1274,7 @@ describe("teamsApp/validateWithTestCases", async () => { appValidationId: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", validationResults: { successes: [ { @@ -1323,7 +1323,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Completed, createdAt: new Date(), updatedAt: new Date(), @@ -1332,7 +1332,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId2", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Aborted, createdAt: new Date(), updatedAt: new Date(), @@ -1349,7 +1349,7 @@ describe("teamsApp/validateWithTestCases", async () => { appValidationId: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", validationResults: { successes: [ { @@ -1434,7 +1434,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Completed, createdAt: new Date(), updatedAt: new Date(), @@ -1443,7 +1443,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId2", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Aborted, createdAt: new Date(), updatedAt: new Date(), @@ -1460,7 +1460,7 @@ describe("teamsApp/validateWithTestCases", async () => { appValidationId: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", validationResults: { failures: [], warnings: [], @@ -1502,7 +1502,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Completed, createdAt: new Date(), updatedAt: new Date(), @@ -1511,7 +1511,7 @@ describe("teamsApp/validateWithTestCases", async () => { id: "fakeId2", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", status: AsyncAppValidationStatus.Aborted, createdAt: new Date(), updatedAt: new Date(), @@ -1528,7 +1528,7 @@ describe("teamsApp/validateWithTestCases", async () => { appValidationId: "fakeId", appId: "fakeAppId", appVersion: "1.0.0", - manifestVersion: "1.16", + manifestVersion: "1.17", validationResults: { failures: [], warnings: [], diff --git a/packages/fx-core/tests/component/generator/spfxGenerator.test.ts b/packages/fx-core/tests/component/generator/spfxGenerator.test.ts index bc2a93c7aa..3f8ae437ef 100644 --- a/packages/fx-core/tests/component/generator/spfxGenerator.test.ts +++ b/packages/fx-core/tests/component/generator/spfxGenerator.test.ts @@ -61,8 +61,8 @@ describe("SPFxGenerator", function () { if (directory.includes("teams")) { return { $schema: - "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - manifestVersion: "1.16", + "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + manifestVersion: "1.17", id: "fakedId", name: { short: "thisisaverylongappnametotestifitwillbetruncated", diff --git a/packages/fx-core/tests/component/resource/appManifest/utils.test.ts b/packages/fx-core/tests/component/resource/appManifest/utils.test.ts index 6709e94165..ab18867401 100644 --- a/packages/fx-core/tests/component/resource/appManifest/utils.test.ts +++ b/packages/fx-core/tests/component/resource/appManifest/utils.test.ts @@ -33,7 +33,7 @@ describe("utils", () => { objectId: "objId", configurationUrl: "https://url", canUpdateConfiguration: false, - scopes: ["groupchat"], + scopes: ["groupChat"], context: [MeetingsContext.ChannelTab], sharePointPreviewImage: "img", supportedSharePointHosts: [], @@ -61,7 +61,7 @@ describe("utils", () => { objectId: "objId", configurationUrl: "https://url", canUpdateConfiguration: false, - scopes: ["groupchat", CommandScope.Team], + scopes: ["groupChat", CommandScope.Team], context: [MeetingsContext.SidePanel], sharePointPreviewImage: "img", supportedSharePointHosts: [], diff --git a/packages/fx-core/tests/component/util/metadataRscPermissionUtil.test.ts b/packages/fx-core/tests/component/util/metadataRscPermissionUtil.test.ts index e7a9e0df4c..2632a6efdc 100644 --- a/packages/fx-core/tests/component/util/metadataRscPermissionUtil.test.ts +++ b/packages/fx-core/tests/component/util/metadataRscPermissionUtil.test.ts @@ -40,11 +40,10 @@ function mockedResolveDriverInstances(log: LogProvider): Result { const manifestContent = ` { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "TEAMS_APP_ID", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -70,7 +69,7 @@ describe("metadata rsc permission util", () => { "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -79,7 +78,7 @@ describe("metadata rsc permission util", () => { "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/packages/fx-core/tests/core/FxCore.test.ts b/packages/fx-core/tests/core/FxCore.test.ts index 96d60aef73..d5e2a19bf5 100644 --- a/packages/fx-core/tests/core/FxCore.test.ts +++ b/packages/fx-core/tests/core/FxCore.test.ts @@ -1402,7 +1402,7 @@ describe("checkProjectType", async () => { hasTeamsManifest: true, manifestCapabilities: ["bot"], manifestAppId: "xxx", - manifestVersion: "1.16", + manifestVersion: "1.17", dependsOnTeamsJs: true, }); const core = new FxCore(tools); diff --git a/packages/manifest/src/manifest.ts b/packages/manifest/src/manifest.ts index af4ec0dc02..5aa110207e 100644 --- a/packages/manifest/src/manifest.ts +++ b/packages/manifest/src/manifest.ts @@ -52,7 +52,7 @@ export interface IConfigurableTab { /** * Specifies whether the tab offers an experience in the context of a channel in a team, in a 1:1 or group chat, or in an experience scoped to an individual user alone. These options are non-exclusive. Currently, configurable tabs are only supported in the teams and groupchats scopes. */ - scopes: ("team" | "groupchat")[]; + scopes: ("team" | "groupchat" | "groupChat")[]; /** * The set of contextItem scopes that a tab belong to */ @@ -184,7 +184,7 @@ export interface IWebApplicationInfo { applicationPermissions?: string[]; } -export type BotOrMeScopes = ("team" | "personal" | "groupchat")[]; +export type BotOrMeScopes = ("team" | "personal" | "groupchat" | "groupChat")[]; export interface IComposeExtension { objectId?: string; @@ -534,7 +534,7 @@ export class TeamsAppManifest implements AppManifest { /** * The install scope defined for this app by default. This will be the option displayed on the button when a user tries to add the app */ - defaultInstallScope?: "personal" | "team" | "groupchat" | "meetings"; + defaultInstallScope?: "personal" | "team" | "groupchat" | "groupChat" | "meetings"; /** * When a group install scope is selected, this will define the default capability when the user installs the app */ diff --git a/packages/vscode-extension/package.json b/packages/vscode-extension/package.json index 7905d959ae..8de31ef4da 100644 --- a/packages/vscode-extension/package.json +++ b/packages/vscode-extension/package.json @@ -1158,6 +1158,19 @@ } }, "additionalProperties": false + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "description": "%teamstoolkit.taskDefinitions.args.url.title%" + } + }, + "additionalProperties": false } ] } diff --git a/packages/vscode-extension/package.nls.json b/packages/vscode-extension/package.nls.json index f1c3493caa..7eb6e449dd 100644 --- a/packages/vscode-extension/package.nls.json +++ b/packages/vscode-extension/package.nls.json @@ -322,6 +322,7 @@ "teamstoolkit.localDebug.useTestTool": "Alternatively, you can skip this step by choosing the %s option.", "teamstoolkit.localDebug.launchTeamsDesktopClientError": "Unable to launch Teams desktop client.", "teamstoolkit.localDebug.launchTeamsDesktopClientStoppedError": "Task to launch Teams desktop client stopped with exit code '%s'.", + "teamstoolkit.localDebug.launchTeamsDesktopClientMessage": "Before proceeding, make sure your Teams desktop login matches your current Microsoft 365 account %s used in Teams Toolkit.", "teamstoolkit.migrateTeamsManifest.progressTitle": "Upgrade Teams Manifest to extend in Outlook and the Microsoft 365 app", "teamstoolkit.migrateTeamsManifest.selectFileConfig.name": "Select Teams Manifest to Upgrade", "teamstoolkit.migrateTeamsManifest.selectFileConfig.title": "Select Teams Manifest to Upgrade", @@ -423,6 +424,7 @@ "teamstoolkit.taskDefinitions.args.prerequisites.portsTitle": "Check if the ports are available for debugging.", "teamstoolkit.taskDefinitions.args.portOccupancy.title": "Check the port numbers.", "teamstoolkit.taskDefinitions.args.env.title": "The environment name.", + "teamstoolkit.taskDefinitions.args.url.title": "The Teams app URL.", "teamstoolkit.taskDefinitions.args.expiration.title": "The tunnel will be deleted if inactive for 3600 seconds.", "teamstoolkit.taskDefinitions.args.writeToEnvironmentFile.title": "The keys of the environment variables of tunnel domain and tunnel endpoint.", "teamstoolkit.taskDefinitions.args.writeToEnvironmentFile.domain.title": "The key of the environment variable for tunnel domain.", diff --git a/packages/vscode-extension/src/debug/taskTerminal/launchDesktopClientTerminal.ts b/packages/vscode-extension/src/debug/taskTerminal/launchDesktopClientTerminal.ts index 888bfa3ef4..9e0d68a32b 100644 --- a/packages/vscode-extension/src/debug/taskTerminal/launchDesktopClientTerminal.ts +++ b/packages/vscode-extension/src/debug/taskTerminal/launchDesktopClientTerminal.ts @@ -6,7 +6,13 @@ import * as vscode from "vscode"; import * as util from "util"; import { err, FxError, ok, Result, UserError, Void } from "@microsoft/teamsfx-api"; import { BaseTaskTerminal } from "./baseTaskTerminal"; -import { Correlator, envUtil, MissingEnvironmentVariablesError } from "@microsoft/teamsfx-core"; +import { + AppStudioScopes, + Correlator, + envUtil, + MissingEnvironmentVariablesError, + UserCancelError, +} from "@microsoft/teamsfx-core"; import { localTelemetryReporter, maskValue } from "../localTelemetryReporter"; import { getLocalDebugSession } from "../commonUtils"; import { TelemetryEvent, TelemetryProperty } from "../../telemetry/extTelemetryEvents"; @@ -14,8 +20,12 @@ import { ExtensionErrors, ExtensionSource } from "../../error"; import { getDefaultString, localize } from "../../utils/localizeUtils"; import { openTerminalDisplayMessage, openTerminalMessage } from "../constants"; import { getSystemInputs } from "../../utils/environmentUtils"; -import { core } from "../../globalVariables"; +import { core, tools } from "../../globalVariables"; import * as path from "path"; +import { dotenvUtil } from "@microsoft/teamsfx-core/build/component/utils/envUtil"; +import * as fs from "fs"; + +const showDebugDesktopClientWizard = "SHOW_DEBUG_DESKTOP_CLIENT_WIZARD"; interface LaunchDesktopClientArgs { url: string; @@ -46,6 +56,66 @@ export class LaunchDesktopClientTerminal extends BaseTaskTerminal { private async _do(): Promise> { const inputs = getSystemInputs(); + const configPath = inputs.projectPath! + "/.localConfigs"; + if (!fs.existsSync(configPath)) { + fs.writeFileSync(configPath, ""); + } + const config = dotenvUtil.deserialize(fs.readFileSync(configPath, "utf-8")); + const loginInfo = await tools.tokenProvider.m365TokenProvider.getStatus({ + scopes: AppStudioScopes, + }); + const readMore = `${localize("teamstoolkit.common.readMore")}`; + if (loginInfo.isOk() && loginInfo.value.status === "SignedIn") { + const accountInfo = await tools.tokenProvider.m365TokenProvider.getJsonObject({ + scopes: AppStudioScopes, + }); + let username = ""; + if (accountInfo.isOk() && accountInfo.value["unique_name"]) { + username = "(" + (accountInfo.value["unique_name"] as string) + ")"; + } + if (config.obj[showDebugDesktopClientWizard] === "false") { + void vscode.window + .showWarningMessage( + util.format( + localize("teamstoolkit.localDebug.launchTeamsDesktopClientMessage"), + username + ), + { modal: false }, + readMore + ) + .then((selection) => { + if (selection === readMore) { + void vscode.env.openExternal( + vscode.Uri.parse("https://aka.ms/teamsfx-debug-in-desktop-client") + ); + } + }); + } else { + let userSelected: string | undefined; + do { + userSelected = await vscode.window.showInformationMessage( + util.format( + localize("teamstoolkit.localDebug.launchTeamsDesktopClientMessage"), + username + ), + { modal: true }, + "Continue", + `${localize("teamstoolkit.common.readMore")}` + ); + if (userSelected === readMore) { + void vscode.env.openExternal( + vscode.Uri.parse("https://aka.ms/teamsfx-debug-in-desktop-client") + ); + } else if (userSelected != "Continue") { + return err(new UserCancelError()); + } else { + config.obj[showDebugDesktopClientWizard] = "false"; + fs.writeFileSync(configPath, dotenvUtil.serialize(config)); + } + } while (userSelected === readMore); + } + } + let url: string = this.args.url; let env: string | undefined = undefined; @@ -82,7 +152,7 @@ export class LaunchDesktopClientTerminal extends BaseTaskTerminal { throw new MissingEnvironmentVariablesError( ExtensionSource, key, - path.normalize(path.join(inputs.projectPath!, ".vscode", "tasks.json")), + path.normalize(path.join(inputs.projectPath!, "env", ".env." + env)), "https://aka.ms/teamsfx-tasks" ); } diff --git a/packages/vscode-extension/src/migration/constants.ts b/packages/vscode-extension/src/migration/constants.ts index 639e51ad7c..c37a6f16eb 100644 --- a/packages/vscode-extension/src/migration/constants.ts +++ b/packages/vscode-extension/src/migration/constants.ts @@ -15,8 +15,8 @@ export class CommentMessages { export const teamsClientSDKName = "@microsoft/teams-js"; export const teamsClientSDKVersion = "^2.0.0"; export const teamsManifestSchema = - "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json"; -export const teamsManifestVersion = "1.16"; + "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json"; +export const teamsManifestVersion = "1.17"; export const teamsClientSDKDefaultNamespace = "microsoftTeams"; diff --git a/templates/csharp/ai-assistant-bot/appPackage/manifest.json.tpl b/templates/csharp/ai-assistant-bot/appPackage/manifest.json.tpl index d54a1e93c2..7d6a5403f9 100644 --- a/templates/csharp/ai-assistant-bot/appPackage/manifest.json.tpl +++ b/templates/csharp/ai-assistant-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/ai-bot/appPackage/manifest.json.tpl b/templates/csharp/ai-bot/appPackage/manifest.json.tpl index d54a1e93c2..7d6a5403f9 100644 --- a/templates/csharp/ai-bot/appPackage/manifest.json.tpl +++ b/templates/csharp/ai-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/command-and-response/appPackage/manifest.json.tpl b/templates/csharp/command-and-response/appPackage/manifest.json.tpl index 3cfba94e6f..cf2bbc13dc 100644 --- a/templates/csharp/command-and-response/appPackage/manifest.json.tpl +++ b/templates/csharp/command-and-response/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/csharp/default-bot/appPackage/manifest.json.tpl b/templates/csharp/default-bot/appPackage/manifest.json.tpl index d54a1e93c2..7d6a5403f9 100644 --- a/templates/csharp/default-bot/appPackage/manifest.json.tpl +++ b/templates/csharp/default-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/link-unfurling/appPackage/manifest.json.tpl b/templates/csharp/link-unfurling/appPackage/manifest.json.tpl index 1d331700d1..1923c25ee2 100644 --- a/templates/csharp/link-unfurling/appPackage/manifest.json.tpl +++ b/templates/csharp/link-unfurling/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/csharp/message-extension-action/appPackage/manifest.json.tpl b/templates/csharp/message-extension-action/appPackage/manifest.json.tpl index 27a7298b66..f10cec7aeb 100644 --- a/templates/csharp/message-extension-action/appPackage/manifest.json.tpl +++ b/templates/csharp/message-extension-action/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/csharp/message-extension-search/appPackage/manifest.json.tpl b/templates/csharp/message-extension-search/appPackage/manifest.json.tpl index 71602a58fb..2e0be68cd6 100644 --- a/templates/csharp/message-extension-search/appPackage/manifest.json.tpl +++ b/templates/csharp/message-extension-search/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/csharp/message-extension/appPackage/manifest.json.tpl b/templates/csharp/message-extension/appPackage/manifest.json.tpl index 7649efda27..f14ff9c6d1 100644 --- a/templates/csharp/message-extension/appPackage/manifest.json.tpl +++ b/templates/csharp/message-extension/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/csharp/non-sso-tab-ssr/appPackage/manifest.json.tpl b/templates/csharp/non-sso-tab-ssr/appPackage/manifest.json.tpl index 8cb59bb49a..55678cd172 100644 --- a/templates/csharp/non-sso-tab-ssr/appPackage/manifest.json.tpl +++ b/templates/csharp/non-sso-tab-ssr/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/csharp/non-sso-tab/appPackage/manifest.json.tpl b/templates/csharp/non-sso-tab/appPackage/manifest.json.tpl index 2bca5a39cc..e6d4641137 100644 --- a/templates/csharp/non-sso-tab/appPackage/manifest.json.tpl +++ b/templates/csharp/non-sso-tab/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/csharp/notification-http-timer-trigger-isolated/appPackage/manifest.json.tpl b/templates/csharp/notification-http-timer-trigger-isolated/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/csharp/notification-http-timer-trigger-isolated/appPackage/manifest.json.tpl +++ b/templates/csharp/notification-http-timer-trigger-isolated/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/notification-http-timer-trigger/appPackage/manifest.json.tpl b/templates/csharp/notification-http-timer-trigger/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/csharp/notification-http-timer-trigger/appPackage/manifest.json.tpl +++ b/templates/csharp/notification-http-timer-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/notification-http-trigger-isolated/appPackage/manifest.json.tpl b/templates/csharp/notification-http-trigger-isolated/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/csharp/notification-http-trigger-isolated/appPackage/manifest.json.tpl +++ b/templates/csharp/notification-http-trigger-isolated/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/notification-http-trigger/appPackage/manifest.json.tpl b/templates/csharp/notification-http-trigger/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/csharp/notification-http-trigger/appPackage/manifest.json.tpl +++ b/templates/csharp/notification-http-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/notification-timer-trigger-isolated/appPackage/manifest.json.tpl b/templates/csharp/notification-timer-trigger-isolated/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/csharp/notification-timer-trigger-isolated/appPackage/manifest.json.tpl +++ b/templates/csharp/notification-timer-trigger-isolated/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/notification-timer-trigger/appPackage/manifest.json.tpl b/templates/csharp/notification-timer-trigger/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/csharp/notification-timer-trigger/appPackage/manifest.json.tpl +++ b/templates/csharp/notification-timer-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/notification-webapi/appPackage/manifest.json.tpl b/templates/csharp/notification-webapi/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/csharp/notification-webapi/appPackage/manifest.json.tpl +++ b/templates/csharp/notification-webapi/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl b/templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl index 34e91ad773..713f2aaaa1 100644 --- a/templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl +++ b/templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/csharp/sso-tab/appPackage/manifest.json.tpl b/templates/csharp/sso-tab/appPackage/manifest.json.tpl index 34e91ad773..713f2aaaa1 100644 --- a/templates/csharp/sso-tab/appPackage/manifest.json.tpl +++ b/templates/csharp/sso-tab/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/csharp/workflow/appPackage/manifest.json.tpl b/templates/csharp/workflow/appPackage/manifest.json.tpl index 3cfba94e6f..cf2bbc13dc 100644 --- a/templates/csharp/workflow/appPackage/manifest.json.tpl +++ b/templates/csharp/workflow/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/js/ai-assistant-bot/appPackage/manifest.json.tpl b/templates/js/ai-assistant-bot/appPackage/manifest.json.tpl index 85018e9501..ea7aad4540 100644 --- a/templates/js/ai-assistant-bot/appPackage/manifest.json.tpl +++ b/templates/js/ai-assistant-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/js/ai-bot/appPackage/manifest.json.tpl b/templates/js/ai-bot/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/js/ai-bot/appPackage/manifest.json.tpl +++ b/templates/js/ai-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/command-and-response/appPackage/manifest.json.tpl b/templates/js/command-and-response/appPackage/manifest.json.tpl index 3cfba94e6f..cf2bbc13dc 100644 --- a/templates/js/command-and-response/appPackage/manifest.json.tpl +++ b/templates/js/command-and-response/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/js/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl b/templates/js/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl index 85018e9501..ea7aad4540 100644 --- a/templates/js/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl +++ b/templates/js/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/js/custom-copilot-assistant-new/appPackage/manifest.json.tpl b/templates/js/custom-copilot-assistant-new/appPackage/manifest.json.tpl index 85018e9501..ea7aad4540 100644 --- a/templates/js/custom-copilot-assistant-new/appPackage/manifest.json.tpl +++ b/templates/js/custom-copilot-assistant-new/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/js/custom-copilot-basic/.vscode/launch.json.tpl b/templates/js/custom-copilot-basic/.vscode/launch.json.tpl index 4aac3cc34c..ea9041e25c 100644 --- a/templates/js/custom-copilot-basic/.vscode/launch.json.tpl +++ b/templates/js/custom-copilot-basic/.vscode/launch.json.tpl @@ -64,6 +64,18 @@ "hidden": true }, "internalConsoleOptions": "neverOpen" + }, + { + "name": "Launch Remote (Desktop)", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/do_nothing.js", + "preLaunchTask": "Start Teams App in Desktop Client (Remote)", + "presentation": { + "group": "3-remote", + "order": 3 + }, + "internalConsoleOptions": "neverOpen", } ], "compounds": [ @@ -103,6 +115,18 @@ }, "stopAll": true }, + { + "name": "Debug in Teams (Desktop)", + "configurations": [ + "Attach to Local Service" + ], + "preLaunchTask": "Start Teams App in Desktop Client", + "presentation": { + "group": "2-local", + "order": 3 + }, + "stopAll": true + }, { "name": "Debug in Test Tool", "configurations": [ diff --git a/templates/js/custom-copilot-basic/.vscode/tasks.json b/templates/js/custom-copilot-basic/.vscode/tasks.json index 1c3e241f27..131ecc2a60 100644 --- a/templates/js/custom-copilot-basic/.vscode/tasks.json +++ b/templates/js/custom-copilot-basic/.vscode/tasks.json @@ -199,6 +199,41 @@ "endsPattern": "restify listening to|Bot/ME service listening at|[nodemon] app crashed" } } + }, + { + "label": "Start Teams App in Desktop Client", + "dependsOn": [ + "Validate prerequisites", + "Start local tunnel", + "Provision", + "Deploy", + "Start application", + "Start Desktop Client" + ], + "dependsOrder": "sequence" + }, + { + "label": "Start Desktop Client", + "type": "teamsfx", + "command": "launch-desktop-client", + "args": { + "url": "teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true" + } + }, + { + "label": "Start Teams App in Desktop Client (Remote)", + "dependsOn": [ + "Start Desktop Client (Remote)" + ], + "dependsOrder": "sequence" + }, + { + "label": "Start Desktop Client (Remote)", + "type": "teamsfx", + "command": "launch-desktop-client", + "args": { + "url": "teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true" + } } ] } \ No newline at end of file diff --git a/templates/js/custom-copilot-basic/appPackage/manifest.json.tpl b/templates/js/custom-copilot-basic/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/js/custom-copilot-basic/appPackage/manifest.json.tpl +++ b/templates/js/custom-copilot-basic/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl b/templates/js/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/js/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl +++ b/templates/js/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/custom-copilot-rag-custom-api/appPackage/manifest.json.tpl b/templates/js/custom-copilot-rag-custom-api/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/js/custom-copilot-rag-custom-api/appPackage/manifest.json.tpl +++ b/templates/js/custom-copilot-rag-custom-api/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/custom-copilot-rag-customize/appPackage/manifest.json.tpl b/templates/js/custom-copilot-rag-customize/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/js/custom-copilot-rag-customize/appPackage/manifest.json.tpl +++ b/templates/js/custom-copilot-rag-customize/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/custom-copilot-rag-microsoft365/appPackage/manifest.json.tpl b/templates/js/custom-copilot-rag-microsoft365/appPackage/manifest.json.tpl index 34072a4676..35c67f7258 100644 --- a/templates/js/custom-copilot-rag-microsoft365/appPackage/manifest.json.tpl +++ b/templates/js/custom-copilot-rag-microsoft365/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/dashboard-tab/appPackage/manifest.json.tpl b/templates/js/dashboard-tab/appPackage/manifest.json.tpl index 1bbff1b9fc..1a8770d2ce 100644 --- a/templates/js/dashboard-tab/appPackage/manifest.json.tpl +++ b/templates/js/dashboard-tab/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "${{TAB_ENDPOINT}}", diff --git a/templates/js/default-bot-message-extension/appPackage/manifest.json.tpl b/templates/js/default-bot-message-extension/appPackage/manifest.json.tpl index 10c8339654..7484a37b0c 100644 --- a/templates/js/default-bot-message-extension/appPackage/manifest.json.tpl +++ b/templates/js/default-bot-message-extension/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/js/default-bot/appPackage/manifest.json.tpl b/templates/js/default-bot/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/js/default-bot/appPackage/manifest.json.tpl +++ b/templates/js/default-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/link-unfurling/appPackage/manifest.json.tpl b/templates/js/link-unfurling/appPackage/manifest.json.tpl index eca0620270..dd36f65601 100644 --- a/templates/js/link-unfurling/appPackage/manifest.json.tpl +++ b/templates/js/link-unfurling/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/js/m365-message-extension/appPackage/manifest.json.tpl b/templates/js/m365-message-extension/appPackage/manifest.json.tpl index 7c63b38ada..ada4841ede 100644 --- a/templates/js/m365-message-extension/appPackage/manifest.json.tpl +++ b/templates/js/m365-message-extension/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/js/message-extension-action/appPackage/manifest.json.tpl b/templates/js/message-extension-action/appPackage/manifest.json.tpl index bf4a32dab4..5ce95fa567 100644 --- a/templates/js/message-extension-action/appPackage/manifest.json.tpl +++ b/templates/js/message-extension-action/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/js/message-extension/appPackage/manifest.json.tpl b/templates/js/message-extension/appPackage/manifest.json.tpl index 5d4de8c3ea..b5f111aed4 100644 --- a/templates/js/message-extension/appPackage/manifest.json.tpl +++ b/templates/js/message-extension/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/js/non-sso-tab-default-bot/appPackage/manifest.json.tpl b/templates/js/non-sso-tab-default-bot/appPackage/manifest.json.tpl index 8b0c291222..0976d52947 100644 --- a/templates/js/non-sso-tab-default-bot/appPackage/manifest.json.tpl +++ b/templates/js/non-sso-tab-default-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "${{TAB_ENDPOINT}}", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/js/non-sso-tab/appPackage/manifest.json.tpl b/templates/js/non-sso-tab/appPackage/manifest.json.tpl index a243665e48..4199df99a3 100644 --- a/templates/js/non-sso-tab/appPackage/manifest.json.tpl +++ b/templates/js/non-sso-tab/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/js/notification-http-timer-trigger/appPackage/manifest.json.tpl b/templates/js/notification-http-timer-trigger/appPackage/manifest.json.tpl index 6cd99e825d..60f6f4e8f5 100644 --- a/templates/js/notification-http-timer-trigger/appPackage/manifest.json.tpl +++ b/templates/js/notification-http-timer-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/notification-http-trigger/appPackage/manifest.json.tpl b/templates/js/notification-http-trigger/appPackage/manifest.json.tpl index 6cd99e825d..60f6f4e8f5 100644 --- a/templates/js/notification-http-trigger/appPackage/manifest.json.tpl +++ b/templates/js/notification-http-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/notification-restify/appPackage/manifest.json.tpl b/templates/js/notification-restify/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/js/notification-restify/appPackage/manifest.json.tpl +++ b/templates/js/notification-restify/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/notification-timer-trigger/appPackage/manifest.json.tpl b/templates/js/notification-timer-trigger/appPackage/manifest.json.tpl index 6cd99e825d..60f6f4e8f5 100644 --- a/templates/js/notification-timer-trigger/appPackage/manifest.json.tpl +++ b/templates/js/notification-timer-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/js/sso-tab-with-obo-flow/appPackage/manifest.json.tpl b/templates/js/sso-tab-with-obo-flow/appPackage/manifest.json.tpl index 504b2770ca..685c1b910a 100644 --- a/templates/js/sso-tab-with-obo-flow/appPackage/manifest.json.tpl +++ b/templates/js/sso-tab-with-obo-flow/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "${{TAB_ENDPOINT}}", diff --git a/templates/js/workflow/appPackage/manifest.json.tpl b/templates/js/workflow/appPackage/manifest.json.tpl index 3cfba94e6f..cf2bbc13dc 100644 --- a/templates/js/workflow/appPackage/manifest.json.tpl +++ b/templates/js/workflow/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/python/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl b/templates/python/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl index 1309b98c88..2fdfb8ec53 100644 --- a/templates/python/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl +++ b/templates/python/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/python/custom-copilot-assistant-new/appPackage/manifest.json.tpl b/templates/python/custom-copilot-assistant-new/appPackage/manifest.json.tpl index 1309b98c88..2fdfb8ec53 100644 --- a/templates/python/custom-copilot-assistant-new/appPackage/manifest.json.tpl +++ b/templates/python/custom-copilot-assistant-new/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/python/custom-copilot-basic/appPackage/manifest.json.tpl b/templates/python/custom-copilot-basic/appPackage/manifest.json.tpl index 1309b98c88..2fdfb8ec53 100644 --- a/templates/python/custom-copilot-basic/appPackage/manifest.json.tpl +++ b/templates/python/custom-copilot-basic/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/python/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl b/templates/python/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl index 1309b98c88..2fdfb8ec53 100644 --- a/templates/python/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl +++ b/templates/python/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/python/custom-copilot-rag-customize/appPackage/manifest.json.tpl b/templates/python/custom-copilot-rag-customize/appPackage/manifest.json.tpl index 1309b98c88..2fdfb8ec53 100644 --- a/templates/python/custom-copilot-rag-customize/appPackage/manifest.json.tpl +++ b/templates/python/custom-copilot-rag-customize/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/ai-assistant-bot/appPackage/manifest.json.tpl b/templates/ts/ai-assistant-bot/appPackage/manifest.json.tpl index 85018e9501..ea7aad4540 100644 --- a/templates/ts/ai-assistant-bot/appPackage/manifest.json.tpl +++ b/templates/ts/ai-assistant-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/ts/ai-bot/appPackage/manifest.json.tpl b/templates/ts/ai-bot/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/ts/ai-bot/appPackage/manifest.json.tpl +++ b/templates/ts/ai-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/command-and-response/appPackage/manifest.json.tpl b/templates/ts/command-and-response/appPackage/manifest.json.tpl index 3cfba94e6f..cf2bbc13dc 100644 --- a/templates/ts/command-and-response/appPackage/manifest.json.tpl +++ b/templates/ts/command-and-response/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/ts/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl b/templates/ts/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl index 85018e9501..ea7aad4540 100644 --- a/templates/ts/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl +++ b/templates/ts/custom-copilot-assistant-assistants-api/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/ts/custom-copilot-assistant-new/appPackage/manifest.json.tpl b/templates/ts/custom-copilot-assistant-new/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/ts/custom-copilot-assistant-new/appPackage/manifest.json.tpl +++ b/templates/ts/custom-copilot-assistant-new/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/custom-copilot-basic/appPackage/manifest.json.tpl b/templates/ts/custom-copilot-basic/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/ts/custom-copilot-basic/appPackage/manifest.json.tpl +++ b/templates/ts/custom-copilot-basic/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl b/templates/ts/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/ts/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl +++ b/templates/ts/custom-copilot-rag-azure-ai-search/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/custom-copilot-rag-custom-api/appPackage/manifest.json.tpl b/templates/ts/custom-copilot-rag-custom-api/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/ts/custom-copilot-rag-custom-api/appPackage/manifest.json.tpl +++ b/templates/ts/custom-copilot-rag-custom-api/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/custom-copilot-rag-customize/appPackage/manifest.json.tpl b/templates/ts/custom-copilot-rag-customize/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/ts/custom-copilot-rag-customize/appPackage/manifest.json.tpl +++ b/templates/ts/custom-copilot-rag-customize/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/custom-copilot-rag-microsoft365/appPackage/manifest.json.tpl b/templates/ts/custom-copilot-rag-microsoft365/appPackage/manifest.json.tpl index 34072a4676..35c67f7258 100644 --- a/templates/ts/custom-copilot-rag-microsoft365/appPackage/manifest.json.tpl +++ b/templates/ts/custom-copilot-rag-microsoft365/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/dashboard-tab/appPackage/manifest.json.tpl b/templates/ts/dashboard-tab/appPackage/manifest.json.tpl index 53bc37f9c2..8dcd0c16c4 100644 --- a/templates/ts/dashboard-tab/appPackage/manifest.json.tpl +++ b/templates/ts/dashboard-tab/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "${{TAB_ENDPOINT}}", diff --git a/templates/ts/default-bot-message-extension/appPackage/manifest.json.tpl b/templates/ts/default-bot-message-extension/appPackage/manifest.json.tpl index 10c8339654..7484a37b0c 100644 --- a/templates/ts/default-bot-message-extension/appPackage/manifest.json.tpl +++ b/templates/ts/default-bot-message-extension/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/ts/default-bot-message-extension/infra/azure.bicep b/templates/ts/default-bot-message-extension/infra/azure.bicep index 67dcc366d3..256f1ce89f 100644 --- a/templates/ts/default-bot-message-extension/infra/azure.bicep +++ b/templates/ts/default-bot-message-extension/infra/azure.bicep @@ -3,13 +3,6 @@ @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) @@ -17,8 +10,14 @@ 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' @@ -54,16 +53,26 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'BOT_ID' - value: botAadAppClientId + value: identity.properties.clientId } { - name: 'BOT_PASSWORD' - value: botAadAppClientSecret + name: 'BOT_TENANT_ID' + value: identity.properties.tenantId + } + { + name: 'BOT_TYPE' + value: 'UserAssignedMsi' } ] ftpsState: 'FtpsOnly' } } + identity: { + type: 'UserAssigned' + userAssignedIdentities: { + '${identity.id}': {} + } + } } // Register your web service as a bot with the Bot Framework @@ -71,7 +80,9 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' params: { resourceBaseName: resourceBaseName - botAadAppClientId: botAadAppClientId + identityClientId: identity.properties.clientId + identityResourceId: identity.id + identityTenantId: identity.properties.tenantId botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName } @@ -80,3 +91,5 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { // 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/templates/ts/default-bot-message-extension/infra/azure.parameters.json.tpl b/templates/ts/default-bot-message-extension/infra/azure.parameters.json.tpl index 47711c4597..62a64c38ff 100644 --- a/templates/ts/default-bot-message-extension/infra/azure.parameters.json.tpl +++ b/templates/ts/default-bot-message-extension/infra/azure.parameters.json.tpl @@ -5,12 +5,6 @@ "resourceBaseName": { "value": "bot${{RESOURCE_SUFFIX}}" }, - "botAadAppClientId": { - "value": "${{BOT_ID}}" - }, - "botAadAppClientSecret": { - "value": "${{SECRET_BOT_PASSWORD}}" - }, "webAppSKU": { "value": "B1" }, diff --git a/templates/ts/default-bot-message-extension/infra/botRegistration/azurebot.bicep b/templates/ts/default-bot-message-extension/infra/botRegistration/azurebot.bicep index ab67c7a56b..a5a27b8fe4 100644 --- a/templates/ts/default-bot-message-extension/infra/botRegistration/azurebot.bicep +++ b/templates/ts/default-bot-message-extension/infra/botRegistration/azurebot.bicep @@ -8,7 +8,9 @@ param botDisplayName string param botServiceName string = resourceBaseName param botServiceSku string = 'F0' -param botAadAppClientId string +param identityResourceId string +param identityClientId string +param identityTenantId string param botAppDomain string // Register your web service as a bot with the Bot Framework @@ -19,7 +21,10 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { properties: { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' - msaAppId: botAadAppClientId + msaAppId: identityClientId + msaAppMSIResourceId: identityResourceId + msaAppTenantId:identityTenantId + msaAppType:'UserAssignedMSI' } sku: { name: botServiceSku diff --git a/templates/ts/default-bot-message-extension/src/config.ts b/templates/ts/default-bot-message-extension/src/config.ts index e9b800a1ec..4e6c184a7d 100644 --- a/templates/ts/default-bot-message-extension/src/config.ts +++ b/templates/ts/default-bot-message-extension/src/config.ts @@ -1,6 +1,8 @@ const config = { - botId: process.env.BOT_ID, - botPassword: process.env.BOT_PASSWORD, + MicrosoftAppId: process.env.BOT_ID, + MicrosoftAppType: process.env.BOT_TYPE, + MicrosoftAppTenantId: process.env.BOT_TENANT_ID, + MicrosoftAppPassword: process.env.BOT_PASSWORD, }; export default config; diff --git a/templates/ts/default-bot-message-extension/src/index.ts b/templates/ts/default-bot-message-extension/src/index.ts index 74af87c3d3..5e1926a532 100644 --- a/templates/ts/default-bot-message-extension/src/index.ts +++ b/templates/ts/default-bot-message-extension/src/index.ts @@ -16,11 +16,7 @@ import config from "./config"; // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: config.botId, - MicrosoftAppPassword: config.botPassword, - MicrosoftAppType: "MultiTenant", -}); +const credentialsFactory = new ConfigurationServiceClientCredentialFactory(config); const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( {}, diff --git a/templates/ts/default-bot-message-extension/teamsapp.local.yml.tpl b/templates/ts/default-bot-message-extension/teamsapp.local.yml.tpl index fca08704a9..16ab4f350e 100644 --- a/templates/ts/default-bot-message-extension/teamsapp.local.yml.tpl +++ b/templates/ts/default-bot-message-extension/teamsapp.local.yml.tpl @@ -80,3 +80,4 @@ deploy: envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + BOT_TYPE: 'MultiTenant' diff --git a/templates/ts/default-bot-message-extension/teamsapp.yml.tpl b/templates/ts/default-bot-message-extension/teamsapp.yml.tpl index 7927dcf93f..5ca9a598e2 100644 --- a/templates/ts/default-bot-message-extension/teamsapp.yml.tpl +++ b/templates/ts/default-bot-message-extension/teamsapp.yml.tpl @@ -17,21 +17,6 @@ provision: writeToEnvironmentFile: teamsAppId: TEAMS_APP_ID - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - - uses: arm/deploy # Deploy given ARM templates parallelly. with: # AZURE_SUBSCRIPTION_ID is a built-in environment variable, diff --git a/templates/ts/default-bot/appPackage/manifest.json.tpl b/templates/ts/default-bot/appPackage/manifest.json.tpl index d7a51bc8fb..5f4b526f64 100644 --- a/templates/ts/default-bot/appPackage/manifest.json.tpl +++ b/templates/ts/default-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/default-bot/config.ts b/templates/ts/default-bot/config.ts index e9b800a1ec..4e6c184a7d 100644 --- a/templates/ts/default-bot/config.ts +++ b/templates/ts/default-bot/config.ts @@ -1,6 +1,8 @@ const config = { - botId: process.env.BOT_ID, - botPassword: process.env.BOT_PASSWORD, + MicrosoftAppId: process.env.BOT_ID, + MicrosoftAppType: process.env.BOT_TYPE, + MicrosoftAppTenantId: process.env.BOT_TENANT_ID, + MicrosoftAppPassword: process.env.BOT_PASSWORD, }; export default config; diff --git a/templates/ts/default-bot/index.ts b/templates/ts/default-bot/index.ts index 555a979b25..27c731da77 100644 --- a/templates/ts/default-bot/index.ts +++ b/templates/ts/default-bot/index.ts @@ -16,11 +16,7 @@ import config from "./config"; // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: config.botId, - MicrosoftAppPassword: config.botPassword, - MicrosoftAppType: "MultiTenant", -}); +const credentialsFactory = new ConfigurationServiceClientCredentialFactory(config); const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( {}, diff --git a/templates/ts/default-bot/infra/azure.bicep b/templates/ts/default-bot/infra/azure.bicep index 67dcc366d3..256f1ce89f 100644 --- a/templates/ts/default-bot/infra/azure.bicep +++ b/templates/ts/default-bot/infra/azure.bicep @@ -3,13 +3,6 @@ @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) @@ -17,8 +10,14 @@ 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' @@ -54,16 +53,26 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'BOT_ID' - value: botAadAppClientId + value: identity.properties.clientId } { - name: 'BOT_PASSWORD' - value: botAadAppClientSecret + name: 'BOT_TENANT_ID' + value: identity.properties.tenantId + } + { + name: 'BOT_TYPE' + value: 'UserAssignedMsi' } ] ftpsState: 'FtpsOnly' } } + identity: { + type: 'UserAssigned' + userAssignedIdentities: { + '${identity.id}': {} + } + } } // Register your web service as a bot with the Bot Framework @@ -71,7 +80,9 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' params: { resourceBaseName: resourceBaseName - botAadAppClientId: botAadAppClientId + identityClientId: identity.properties.clientId + identityResourceId: identity.id + identityTenantId: identity.properties.tenantId botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName } @@ -80,3 +91,5 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { // 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/templates/ts/default-bot/infra/azure.parameters.json.tpl b/templates/ts/default-bot/infra/azure.parameters.json.tpl index 47711c4597..62a64c38ff 100644 --- a/templates/ts/default-bot/infra/azure.parameters.json.tpl +++ b/templates/ts/default-bot/infra/azure.parameters.json.tpl @@ -5,12 +5,6 @@ "resourceBaseName": { "value": "bot${{RESOURCE_SUFFIX}}" }, - "botAadAppClientId": { - "value": "${{BOT_ID}}" - }, - "botAadAppClientSecret": { - "value": "${{SECRET_BOT_PASSWORD}}" - }, "webAppSKU": { "value": "B1" }, diff --git a/templates/ts/default-bot/infra/botRegistration/azurebot.bicep b/templates/ts/default-bot/infra/botRegistration/azurebot.bicep index ab67c7a56b..a5a27b8fe4 100644 --- a/templates/ts/default-bot/infra/botRegistration/azurebot.bicep +++ b/templates/ts/default-bot/infra/botRegistration/azurebot.bicep @@ -8,7 +8,9 @@ param botDisplayName string param botServiceName string = resourceBaseName param botServiceSku string = 'F0' -param botAadAppClientId string +param identityResourceId string +param identityClientId string +param identityTenantId string param botAppDomain string // Register your web service as a bot with the Bot Framework @@ -19,7 +21,10 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { properties: { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' - msaAppId: botAadAppClientId + msaAppId: identityClientId + msaAppMSIResourceId: identityResourceId + msaAppTenantId:identityTenantId + msaAppType:'UserAssignedMSI' } sku: { name: botServiceSku diff --git a/templates/ts/default-bot/teamsapp.local.yml.tpl b/templates/ts/default-bot/teamsapp.local.yml.tpl index fca08704a9..16ab4f350e 100644 --- a/templates/ts/default-bot/teamsapp.local.yml.tpl +++ b/templates/ts/default-bot/teamsapp.local.yml.tpl @@ -80,3 +80,4 @@ deploy: envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + BOT_TYPE: 'MultiTenant' diff --git a/templates/ts/default-bot/teamsapp.yml.tpl b/templates/ts/default-bot/teamsapp.yml.tpl index 7927dcf93f..f5cf8c9209 100644 --- a/templates/ts/default-bot/teamsapp.yml.tpl +++ b/templates/ts/default-bot/teamsapp.yml.tpl @@ -16,22 +16,7 @@ provision: # the specified environment variable(s). writeToEnvironmentFile: teamsAppId: TEAMS_APP_ID - - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - + - uses: arm/deploy # Deploy given ARM templates parallelly. with: # AZURE_SUBSCRIPTION_ID is a built-in environment variable, diff --git a/templates/ts/link-unfurling/appPackage/manifest.json.tpl b/templates/ts/link-unfurling/appPackage/manifest.json.tpl index eca0620270..dd36f65601 100644 --- a/templates/ts/link-unfurling/appPackage/manifest.json.tpl +++ b/templates/ts/link-unfurling/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/ts/link-unfurling/infra/azure.bicep b/templates/ts/link-unfurling/infra/azure.bicep index 67dcc366d3..cca52bf38e 100644 --- a/templates/ts/link-unfurling/infra/azure.bicep +++ b/templates/ts/link-unfurling/infra/azure.bicep @@ -3,13 +3,6 @@ @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) @@ -17,8 +10,14 @@ 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' @@ -54,16 +53,26 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'BOT_ID' - value: botAadAppClientId + value: identity.properties.clientId } { - name: 'BOT_PASSWORD' - value: botAadAppClientSecret + name: 'BOT_TENANT_ID' + value: identity.properties.tenantId + } + { + name: 'BOT_TYPE' + value: 'UserAssignedMsi' } ] ftpsState: 'FtpsOnly' } } + identity: { + type: 'UserAssigned' + userAssignedIdentities: { + '${identity.id}': {} + } + } } // Register your web service as a bot with the Bot Framework @@ -71,7 +80,9 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' params: { resourceBaseName: resourceBaseName - botAadAppClientId: botAadAppClientId + identityClientId: identity.properties.clientId + identityResourceId: identity.id + identityTenantId: identity.properties.tenantId botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName } @@ -80,3 +91,5 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { // 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/templates/ts/link-unfurling/infra/azure.parameters.json.tpl b/templates/ts/link-unfurling/infra/azure.parameters.json.tpl index 7b52600021..f7b8541939 100644 --- a/templates/ts/link-unfurling/infra/azure.parameters.json.tpl +++ b/templates/ts/link-unfurling/infra/azure.parameters.json.tpl @@ -5,12 +5,6 @@ "resourceBaseName": { "value": "ME${{RESOURCE_SUFFIX}}" }, - "botAadAppClientId": { - "value": "${{BOT_ID}}" - }, - "botAadAppClientSecret": { - "value": "${{SECRET_BOT_PASSWORD}}" - }, "webAppSKU": { "value": "B1" }, diff --git a/templates/ts/link-unfurling/infra/botRegistration/azurebot.bicep b/templates/ts/link-unfurling/infra/botRegistration/azurebot.bicep index 4450c8dfe6..11b7c449ef 100644 --- a/templates/ts/link-unfurling/infra/botRegistration/azurebot.bicep +++ b/templates/ts/link-unfurling/infra/botRegistration/azurebot.bicep @@ -8,7 +8,9 @@ param botDisplayName string param botServiceName string = resourceBaseName param botServiceSku string = 'F0' -param botAadAppClientId string +param identityResourceId string +param identityClientId string +param identityTenantId string param botAppDomain string // Register your web service as a bot with the Bot Framework @@ -19,7 +21,10 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { properties: { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' - msaAppId: botAadAppClientId + msaAppId: identityClientId + msaAppMSIResourceId: identityResourceId + msaAppTenantId:identityTenantId + msaAppType:'UserAssignedMSI' } sku: { name: botServiceSku diff --git a/templates/ts/link-unfurling/src/config.ts b/templates/ts/link-unfurling/src/config.ts index e9b800a1ec..4e6c184a7d 100644 --- a/templates/ts/link-unfurling/src/config.ts +++ b/templates/ts/link-unfurling/src/config.ts @@ -1,6 +1,8 @@ const config = { - botId: process.env.BOT_ID, - botPassword: process.env.BOT_PASSWORD, + MicrosoftAppId: process.env.BOT_ID, + MicrosoftAppType: process.env.BOT_TYPE, + MicrosoftAppTenantId: process.env.BOT_TENANT_ID, + MicrosoftAppPassword: process.env.BOT_PASSWORD, }; export default config; diff --git a/templates/ts/link-unfurling/src/index.ts b/templates/ts/link-unfurling/src/index.ts index b4f89a9297..ae446b9802 100644 --- a/templates/ts/link-unfurling/src/index.ts +++ b/templates/ts/link-unfurling/src/index.ts @@ -11,11 +11,7 @@ import config from "./config"; // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: config.botId, - MicrosoftAppPassword: config.botPassword, - MicrosoftAppType: "MultiTenant", -}); +const credentialsFactory = new ConfigurationServiceClientCredentialFactory(config); const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( {}, diff --git a/templates/ts/link-unfurling/teamsapp.local.yml.tpl b/templates/ts/link-unfurling/teamsapp.local.yml.tpl index d1442ec2b5..c7d96e0f94 100644 --- a/templates/ts/link-unfurling/teamsapp.local.yml.tpl +++ b/templates/ts/link-unfurling/teamsapp.local.yml.tpl @@ -92,3 +92,4 @@ deploy: envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + BOT_TYPE: 'MultiTenant' diff --git a/templates/ts/link-unfurling/teamsapp.yml.tpl b/templates/ts/link-unfurling/teamsapp.yml.tpl index 89cc520335..caf00c6462 100644 --- a/templates/ts/link-unfurling/teamsapp.yml.tpl +++ b/templates/ts/link-unfurling/teamsapp.yml.tpl @@ -17,21 +17,6 @@ provision: writeToEnvironmentFile: teamsAppId: TEAMS_APP_ID - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - - uses: arm/deploy # Deploy given ARM templates parallelly. with: # AZURE_SUBSCRIPTION_ID is a built-in environment variable, diff --git a/templates/ts/m365-message-extension/appPackage/manifest.json.tpl b/templates/ts/m365-message-extension/appPackage/manifest.json.tpl index 7c63b38ada..ada4841ede 100644 --- a/templates/ts/m365-message-extension/appPackage/manifest.json.tpl +++ b/templates/ts/m365-message-extension/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/ts/message-extension-action/appPackage/manifest.json.tpl b/templates/ts/message-extension-action/appPackage/manifest.json.tpl index bf4a32dab4..5ce95fa567 100644 --- a/templates/ts/message-extension-action/appPackage/manifest.json.tpl +++ b/templates/ts/message-extension-action/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/ts/message-extension-action/infra/azure.bicep b/templates/ts/message-extension-action/infra/azure.bicep index 67dcc366d3..256f1ce89f 100644 --- a/templates/ts/message-extension-action/infra/azure.bicep +++ b/templates/ts/message-extension-action/infra/azure.bicep @@ -3,13 +3,6 @@ @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) @@ -17,8 +10,14 @@ 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' @@ -54,16 +53,26 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'BOT_ID' - value: botAadAppClientId + value: identity.properties.clientId } { - name: 'BOT_PASSWORD' - value: botAadAppClientSecret + name: 'BOT_TENANT_ID' + value: identity.properties.tenantId + } + { + name: 'BOT_TYPE' + value: 'UserAssignedMsi' } ] ftpsState: 'FtpsOnly' } } + identity: { + type: 'UserAssigned' + userAssignedIdentities: { + '${identity.id}': {} + } + } } // Register your web service as a bot with the Bot Framework @@ -71,7 +80,9 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' params: { resourceBaseName: resourceBaseName - botAadAppClientId: botAadAppClientId + identityClientId: identity.properties.clientId + identityResourceId: identity.id + identityTenantId: identity.properties.tenantId botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName } @@ -80,3 +91,5 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { // 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/templates/ts/message-extension-action/infra/azure.parameters.json.tpl b/templates/ts/message-extension-action/infra/azure.parameters.json.tpl index 7b52600021..f7b8541939 100644 --- a/templates/ts/message-extension-action/infra/azure.parameters.json.tpl +++ b/templates/ts/message-extension-action/infra/azure.parameters.json.tpl @@ -5,12 +5,6 @@ "resourceBaseName": { "value": "ME${{RESOURCE_SUFFIX}}" }, - "botAadAppClientId": { - "value": "${{BOT_ID}}" - }, - "botAadAppClientSecret": { - "value": "${{SECRET_BOT_PASSWORD}}" - }, "webAppSKU": { "value": "B1" }, diff --git a/templates/ts/message-extension-action/infra/botRegistration/azurebot.bicep b/templates/ts/message-extension-action/infra/botRegistration/azurebot.bicep index c0ff0fc219..bf7f5f4f92 100644 --- a/templates/ts/message-extension-action/infra/botRegistration/azurebot.bicep +++ b/templates/ts/message-extension-action/infra/botRegistration/azurebot.bicep @@ -8,7 +8,9 @@ param botDisplayName string param botServiceName string = resourceBaseName param botServiceSku string = 'F0' -param botAadAppClientId string +param identityResourceId string +param identityClientId string +param identityTenantId string param botAppDomain string // Register your web service as a bot with the Bot Framework @@ -19,7 +21,10 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { properties: { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' - msaAppId: botAadAppClientId + msaAppId: identityClientId + msaAppMSIResourceId: identityResourceId + msaAppTenantId:identityTenantId + msaAppType:'UserAssignedMSI' } sku: { name: botServiceSku diff --git a/templates/ts/message-extension-action/src/config.ts b/templates/ts/message-extension-action/src/config.ts index e9b800a1ec..4e6c184a7d 100644 --- a/templates/ts/message-extension-action/src/config.ts +++ b/templates/ts/message-extension-action/src/config.ts @@ -1,6 +1,8 @@ const config = { - botId: process.env.BOT_ID, - botPassword: process.env.BOT_PASSWORD, + MicrosoftAppId: process.env.BOT_ID, + MicrosoftAppType: process.env.BOT_TYPE, + MicrosoftAppTenantId: process.env.BOT_TENANT_ID, + MicrosoftAppPassword: process.env.BOT_PASSWORD, }; export default config; diff --git a/templates/ts/message-extension-action/src/index.ts b/templates/ts/message-extension-action/src/index.ts index b932cbd48d..01d40a7422 100644 --- a/templates/ts/message-extension-action/src/index.ts +++ b/templates/ts/message-extension-action/src/index.ts @@ -11,11 +11,7 @@ import config from "./config"; // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: config.botId, - MicrosoftAppPassword: config.botPassword, - MicrosoftAppType: "MultiTenant", -}); +const credentialsFactory = new ConfigurationServiceClientCredentialFactory(config); const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( {}, diff --git a/templates/ts/message-extension-action/teamsapp.local.yml.tpl b/templates/ts/message-extension-action/teamsapp.local.yml.tpl index 39fc4d46a0..7a3d7afab5 100644 --- a/templates/ts/message-extension-action/teamsapp.local.yml.tpl +++ b/templates/ts/message-extension-action/teamsapp.local.yml.tpl @@ -78,4 +78,5 @@ deploy: target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} - BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file + BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + BOT_TYPE: 'MultiTenant' diff --git a/templates/ts/message-extension-action/teamsapp.yml.tpl b/templates/ts/message-extension-action/teamsapp.yml.tpl index 4b78fbffa3..e8bdd3e035 100644 --- a/templates/ts/message-extension-action/teamsapp.yml.tpl +++ b/templates/ts/message-extension-action/teamsapp.yml.tpl @@ -17,21 +17,6 @@ provision: writeToEnvironmentFile: teamsAppId: TEAMS_APP_ID - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - - uses: arm/deploy # Deploy given ARM templates parallelly. with: # AZURE_SUBSCRIPTION_ID is a built-in environment variable, diff --git a/templates/ts/message-extension-copilot/infra/azure.bicep b/templates/ts/message-extension-copilot/infra/azure.bicep index 41cf99a692..e2bf38d575 100644 --- a/templates/ts/message-extension-copilot/infra/azure.bicep +++ b/templates/ts/message-extension-copilot/infra/azure.bicep @@ -3,13 +3,6 @@ @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) @@ -17,8 +10,14 @@ 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' @@ -54,16 +53,26 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'BOT_ID' - value: botAadAppClientId + value: identity.properties.clientId } { - name: 'BOT_PASSWORD' - value: botAadAppClientSecret + name: 'BOT_TENANT_ID' + value: identity.properties.tenantId + } + { + name: 'BOT_TYPE' + value: 'UserAssignedMsi' } ] ftpsState: 'FtpsOnly' } } + identity: { + type: 'UserAssigned' + userAssignedIdentities: { + '${identity.id}': {} + } + } } // Register your web service as a bot with the Bot Framework @@ -71,7 +80,9 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' params: { resourceBaseName: resourceBaseName - botAadAppClientId: botAadAppClientId + identityClientId: identity.properties.clientId + identityResourceId: identity.id + identityTenantId: identity.properties.tenantId botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName } @@ -80,3 +91,5 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { // 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/templates/ts/message-extension-copilot/infra/azure.parameters.json.tpl b/templates/ts/message-extension-copilot/infra/azure.parameters.json.tpl index 7b52600021..f7b8541939 100644 --- a/templates/ts/message-extension-copilot/infra/azure.parameters.json.tpl +++ b/templates/ts/message-extension-copilot/infra/azure.parameters.json.tpl @@ -5,12 +5,6 @@ "resourceBaseName": { "value": "ME${{RESOURCE_SUFFIX}}" }, - "botAadAppClientId": { - "value": "${{BOT_ID}}" - }, - "botAadAppClientSecret": { - "value": "${{SECRET_BOT_PASSWORD}}" - }, "webAppSKU": { "value": "B1" }, diff --git a/templates/ts/message-extension-copilot/infra/botRegistration/azurebot.bicep b/templates/ts/message-extension-copilot/infra/botRegistration/azurebot.bicep index 4450c8dfe6..11b7c449ef 100644 --- a/templates/ts/message-extension-copilot/infra/botRegistration/azurebot.bicep +++ b/templates/ts/message-extension-copilot/infra/botRegistration/azurebot.bicep @@ -8,7 +8,9 @@ param botDisplayName string param botServiceName string = resourceBaseName param botServiceSku string = 'F0' -param botAadAppClientId string +param identityResourceId string +param identityClientId string +param identityTenantId string param botAppDomain string // Register your web service as a bot with the Bot Framework @@ -19,7 +21,10 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { properties: { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' - msaAppId: botAadAppClientId + msaAppId: identityClientId + msaAppMSIResourceId: identityResourceId + msaAppTenantId:identityTenantId + msaAppType:'UserAssignedMSI' } sku: { name: botServiceSku diff --git a/templates/ts/message-extension-copilot/src/config.ts b/templates/ts/message-extension-copilot/src/config.ts index e9b800a1ec..4e6c184a7d 100644 --- a/templates/ts/message-extension-copilot/src/config.ts +++ b/templates/ts/message-extension-copilot/src/config.ts @@ -1,6 +1,8 @@ const config = { - botId: process.env.BOT_ID, - botPassword: process.env.BOT_PASSWORD, + MicrosoftAppId: process.env.BOT_ID, + MicrosoftAppType: process.env.BOT_TYPE, + MicrosoftAppTenantId: process.env.BOT_TENANT_ID, + MicrosoftAppPassword: process.env.BOT_PASSWORD, }; export default config; diff --git a/templates/ts/message-extension-copilot/src/index.ts b/templates/ts/message-extension-copilot/src/index.ts index e9116440bf..a2568e3a08 100644 --- a/templates/ts/message-extension-copilot/src/index.ts +++ b/templates/ts/message-extension-copilot/src/index.ts @@ -16,11 +16,7 @@ import config from "./config"; // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: config.botId, - MicrosoftAppPassword: config.botPassword, - MicrosoftAppType: "MultiTenant", -}); +const credentialsFactory = new ConfigurationServiceClientCredentialFactory(config); const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( {}, diff --git a/templates/ts/message-extension-copilot/teamsapp.local.yml.tpl b/templates/ts/message-extension-copilot/teamsapp.local.yml.tpl index d1442ec2b5..c7d96e0f94 100644 --- a/templates/ts/message-extension-copilot/teamsapp.local.yml.tpl +++ b/templates/ts/message-extension-copilot/teamsapp.local.yml.tpl @@ -92,3 +92,4 @@ deploy: envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + BOT_TYPE: 'MultiTenant' diff --git a/templates/ts/message-extension-copilot/teamsapp.yml.tpl b/templates/ts/message-extension-copilot/teamsapp.yml.tpl index 89cc520335..8d84cc81cf 100644 --- a/templates/ts/message-extension-copilot/teamsapp.yml.tpl +++ b/templates/ts/message-extension-copilot/teamsapp.yml.tpl @@ -16,22 +16,7 @@ provision: # the specified environment variable(s). writeToEnvironmentFile: teamsAppId: TEAMS_APP_ID - - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - + - uses: arm/deploy # Deploy given ARM templates parallelly. with: # AZURE_SUBSCRIPTION_ID is a built-in environment variable, diff --git a/templates/ts/message-extension/appPackage/manifest.json.tpl b/templates/ts/message-extension/appPackage/manifest.json.tpl index 5d4de8c3ea..b5f111aed4 100644 --- a/templates/ts/message-extension/appPackage/manifest.json.tpl +++ b/templates/ts/message-extension/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/ts/message-extension/infra/azure.bicep b/templates/ts/message-extension/infra/azure.bicep index 67dcc366d3..256f1ce89f 100644 --- a/templates/ts/message-extension/infra/azure.bicep +++ b/templates/ts/message-extension/infra/azure.bicep @@ -3,13 +3,6 @@ @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) @@ -17,8 +10,14 @@ 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' @@ -54,16 +53,26 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'BOT_ID' - value: botAadAppClientId + value: identity.properties.clientId } { - name: 'BOT_PASSWORD' - value: botAadAppClientSecret + name: 'BOT_TENANT_ID' + value: identity.properties.tenantId + } + { + name: 'BOT_TYPE' + value: 'UserAssignedMsi' } ] ftpsState: 'FtpsOnly' } } + identity: { + type: 'UserAssigned' + userAssignedIdentities: { + '${identity.id}': {} + } + } } // Register your web service as a bot with the Bot Framework @@ -71,7 +80,9 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' params: { resourceBaseName: resourceBaseName - botAadAppClientId: botAadAppClientId + identityClientId: identity.properties.clientId + identityResourceId: identity.id + identityTenantId: identity.properties.tenantId botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName } @@ -80,3 +91,5 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { // 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/templates/ts/message-extension/infra/azure.parameters.json.tpl b/templates/ts/message-extension/infra/azure.parameters.json.tpl index 7b52600021..f7b8541939 100644 --- a/templates/ts/message-extension/infra/azure.parameters.json.tpl +++ b/templates/ts/message-extension/infra/azure.parameters.json.tpl @@ -5,12 +5,6 @@ "resourceBaseName": { "value": "ME${{RESOURCE_SUFFIX}}" }, - "botAadAppClientId": { - "value": "${{BOT_ID}}" - }, - "botAadAppClientSecret": { - "value": "${{SECRET_BOT_PASSWORD}}" - }, "webAppSKU": { "value": "B1" }, diff --git a/templates/ts/message-extension/infra/botRegistration/azurebot.bicep b/templates/ts/message-extension/infra/botRegistration/azurebot.bicep index 4450c8dfe6..11b7c449ef 100644 --- a/templates/ts/message-extension/infra/botRegistration/azurebot.bicep +++ b/templates/ts/message-extension/infra/botRegistration/azurebot.bicep @@ -8,7 +8,9 @@ param botDisplayName string param botServiceName string = resourceBaseName param botServiceSku string = 'F0' -param botAadAppClientId string +param identityResourceId string +param identityClientId string +param identityTenantId string param botAppDomain string // Register your web service as a bot with the Bot Framework @@ -19,7 +21,10 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { properties: { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' - msaAppId: botAadAppClientId + msaAppId: identityClientId + msaAppMSIResourceId: identityResourceId + msaAppTenantId:identityTenantId + msaAppType:'UserAssignedMSI' } sku: { name: botServiceSku diff --git a/templates/ts/message-extension/src/config.ts b/templates/ts/message-extension/src/config.ts index e9b800a1ec..4e6c184a7d 100644 --- a/templates/ts/message-extension/src/config.ts +++ b/templates/ts/message-extension/src/config.ts @@ -1,6 +1,8 @@ const config = { - botId: process.env.BOT_ID, - botPassword: process.env.BOT_PASSWORD, + MicrosoftAppId: process.env.BOT_ID, + MicrosoftAppType: process.env.BOT_TYPE, + MicrosoftAppTenantId: process.env.BOT_TENANT_ID, + MicrosoftAppPassword: process.env.BOT_PASSWORD, }; export default config; diff --git a/templates/ts/message-extension/src/index.ts b/templates/ts/message-extension/src/index.ts index 74af87c3d3..5e1926a532 100644 --- a/templates/ts/message-extension/src/index.ts +++ b/templates/ts/message-extension/src/index.ts @@ -16,11 +16,7 @@ import config from "./config"; // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: config.botId, - MicrosoftAppPassword: config.botPassword, - MicrosoftAppType: "MultiTenant", -}); +const credentialsFactory = new ConfigurationServiceClientCredentialFactory(config); const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( {}, diff --git a/templates/ts/message-extension/teamsapp.local.yml.tpl b/templates/ts/message-extension/teamsapp.local.yml.tpl index c3dc381c9a..a3e295d65c 100644 --- a/templates/ts/message-extension/teamsapp.local.yml.tpl +++ b/templates/ts/message-extension/teamsapp.local.yml.tpl @@ -91,3 +91,4 @@ deploy: envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + BOT_TYPE: 'MultiTenant' diff --git a/templates/ts/message-extension/teamsapp.yml.tpl b/templates/ts/message-extension/teamsapp.yml.tpl index 89cc520335..caf00c6462 100644 --- a/templates/ts/message-extension/teamsapp.yml.tpl +++ b/templates/ts/message-extension/teamsapp.yml.tpl @@ -17,21 +17,6 @@ provision: writeToEnvironmentFile: teamsAppId: TEAMS_APP_ID - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - - uses: arm/deploy # Deploy given ARM templates parallelly. with: # AZURE_SUBSCRIPTION_ID is a built-in environment variable, diff --git a/templates/ts/non-sso-tab-default-bot/appPackage/manifest.json.tpl b/templates/ts/non-sso-tab-default-bot/appPackage/manifest.json.tpl index 8b0c291222..0976d52947 100644 --- a/templates/ts/non-sso-tab-default-bot/appPackage/manifest.json.tpl +++ b/templates/ts/non-sso-tab-default-bot/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "${{TAB_ENDPOINT}}", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ { diff --git a/templates/ts/non-sso-tab-default-bot/bot/config.ts b/templates/ts/non-sso-tab-default-bot/bot/config.ts index e9b800a1ec..4e6c184a7d 100644 --- a/templates/ts/non-sso-tab-default-bot/bot/config.ts +++ b/templates/ts/non-sso-tab-default-bot/bot/config.ts @@ -1,6 +1,8 @@ const config = { - botId: process.env.BOT_ID, - botPassword: process.env.BOT_PASSWORD, + MicrosoftAppId: process.env.BOT_ID, + MicrosoftAppType: process.env.BOT_TYPE, + MicrosoftAppTenantId: process.env.BOT_TENANT_ID, + MicrosoftAppPassword: process.env.BOT_PASSWORD, }; export default config; diff --git a/templates/ts/non-sso-tab-default-bot/bot/index.ts b/templates/ts/non-sso-tab-default-bot/bot/index.ts index 555a979b25..27c731da77 100644 --- a/templates/ts/non-sso-tab-default-bot/bot/index.ts +++ b/templates/ts/non-sso-tab-default-bot/bot/index.ts @@ -16,11 +16,7 @@ import config from "./config"; // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: config.botId, - MicrosoftAppPassword: config.botPassword, - MicrosoftAppType: "MultiTenant", -}); +const credentialsFactory = new ConfigurationServiceClientCredentialFactory(config); const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( {}, diff --git a/templates/ts/non-sso-tab-default-bot/infra/azure.bicep b/templates/ts/non-sso-tab-default-bot/infra/azure.bicep index 79d434df42..cc7a1fe272 100644 --- a/templates/ts/non-sso-tab-default-bot/infra/azure.bicep +++ b/templates/ts/non-sso-tab-default-bot/infra/azure.bicep @@ -2,12 +2,7 @@ @minLength(4) param resourceBaseName string -@description('Required when create Azure Bot service') -param botAadAppClientId string param staticWebAppSku string -@secure() -@description('Required by Bot Framework package in your bot project') -param botAadAppClientSecret string param webAppSKU string @@ -16,11 +11,17 @@ param botDisplayName string param serverfarmsName string = resourceBaseName param webAppName string = resourceBaseName +param identityName string = resourceBaseName param location string = resourceGroup().location param staticWebAppName string = resourceBaseName +resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { + location: location + name: identityName +} + // Azure Static Web App that hosts your static web site resource swa 'Microsoft.Web/staticSites@2022-09-01' = { name: staticWebAppName @@ -70,16 +71,26 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'BOT_ID' - value: botAadAppClientId + value: identity.properties.clientId } { - name: 'BOT_PASSWORD' - value: botAadAppClientSecret + name: 'BOT_TENANT_ID' + value: identity.properties.tenantId + } + { + name: 'BOT_TYPE' + value: 'UserAssignedMsi' } ] ftpsState: 'FtpsOnly' } } + identity: { + type: 'UserAssigned' + userAssignedIdentities: { + '${identity.id}': {} + } + } } // Register your web service as a bot with the Bot Framework @@ -87,7 +98,9 @@ module azureBotRegistration './botRegistration/azurebot.bicep' = { name: 'Azure-Bot-registration' params: { resourceBaseName: resourceBaseName - botAadAppClientId: botAadAppClientId + identityClientId: identity.properties.clientId + identityResourceId: identity.id + identityTenantId: identity.properties.tenantId botAppDomain: webApp.properties.defaultHostName botDisplayName: botDisplayName } @@ -99,3 +112,5 @@ output TAB_ENDPOINT string = 'https://${siteDomain}' output BOT_AZURE_APP_SERVICE_RESOURCE_ID string = webApp.id output BOT_DOMAIN string = webApp.properties.defaultHostName output AZURE_STATIC_WEB_APPS_RESOURCE_ID string = swa.id +output BOT_ID string = identity.properties.clientId +output BOT_TENANT_ID string = identity.properties.tenantId diff --git a/templates/ts/non-sso-tab-default-bot/infra/azure.parameters.json.tpl b/templates/ts/non-sso-tab-default-bot/infra/azure.parameters.json.tpl index 850483d053..771ee20d34 100644 --- a/templates/ts/non-sso-tab-default-bot/infra/azure.parameters.json.tpl +++ b/templates/ts/non-sso-tab-default-bot/infra/azure.parameters.json.tpl @@ -5,12 +5,6 @@ "resourceBaseName": { "value": "tab${{RESOURCE_SUFFIX}}" }, - "botAadAppClientId": { - "value": "${{BOT_ID}}" - }, - "botAadAppClientSecret": { - "value": "${{SECRET_BOT_PASSWORD}}" - }, "webAppSKU": { "value": "B1" }, diff --git a/templates/ts/non-sso-tab-default-bot/infra/botRegistration/azurebot.bicep b/templates/ts/non-sso-tab-default-bot/infra/botRegistration/azurebot.bicep index ab67c7a56b..a5a27b8fe4 100644 --- a/templates/ts/non-sso-tab-default-bot/infra/botRegistration/azurebot.bicep +++ b/templates/ts/non-sso-tab-default-bot/infra/botRegistration/azurebot.bicep @@ -8,7 +8,9 @@ param botDisplayName string param botServiceName string = resourceBaseName param botServiceSku string = 'F0' -param botAadAppClientId string +param identityResourceId string +param identityClientId string +param identityTenantId string param botAppDomain string // Register your web service as a bot with the Bot Framework @@ -19,7 +21,10 @@ resource botService 'Microsoft.BotService/botServices@2021-03-01' = { properties: { displayName: botDisplayName endpoint: 'https://${botAppDomain}/api/messages' - msaAppId: botAadAppClientId + msaAppId: identityClientId + msaAppMSIResourceId: identityResourceId + msaAppTenantId:identityTenantId + msaAppType:'UserAssignedMSI' } sku: { name: botServiceSku diff --git a/templates/ts/non-sso-tab-default-bot/teamsapp.local.yml.tpl b/templates/ts/non-sso-tab-default-bot/teamsapp.local.yml.tpl index 17b5e9a840..84aca29c68 100644 --- a/templates/ts/non-sso-tab-default-bot/teamsapp.local.yml.tpl +++ b/templates/ts/non-sso-tab-default-bot/teamsapp.local.yml.tpl @@ -105,3 +105,4 @@ deploy: envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + BOT_TYPE: 'MultiTenant' diff --git a/templates/ts/non-sso-tab-default-bot/teamsapp.yml.tpl b/templates/ts/non-sso-tab-default-bot/teamsapp.yml.tpl index 003dc62f27..fca259f023 100644 --- a/templates/ts/non-sso-tab-default-bot/teamsapp.yml.tpl +++ b/templates/ts/non-sso-tab-default-bot/teamsapp.yml.tpl @@ -17,21 +17,6 @@ provision: writeToEnvironmentFile: teamsAppId: TEAMS_APP_ID - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - - uses: arm/deploy # Deploy given ARM templates parallelly. with: # AZURE_SUBSCRIPTION_ID is a built-in environment variable, diff --git a/templates/ts/non-sso-tab/appPackage/manifest.json.tpl b/templates/ts/non-sso-tab/appPackage/manifest.json.tpl index a243665e48..4199df99a3 100644 --- a/templates/ts/non-sso-tab/appPackage/manifest.json.tpl +++ b/templates/ts/non-sso-tab/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", diff --git a/templates/ts/notification-http-timer-trigger/appPackage/manifest.json.tpl b/templates/ts/notification-http-timer-trigger/appPackage/manifest.json.tpl index 6cd99e825d..60f6f4e8f5 100644 --- a/templates/ts/notification-http-timer-trigger/appPackage/manifest.json.tpl +++ b/templates/ts/notification-http-timer-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/notification-http-trigger/appPackage/manifest.json.tpl b/templates/ts/notification-http-trigger/appPackage/manifest.json.tpl index 6cd99e825d..60f6f4e8f5 100644 --- a/templates/ts/notification-http-trigger/appPackage/manifest.json.tpl +++ b/templates/ts/notification-http-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/notification-restify/appPackage/manifest.json.tpl b/templates/ts/notification-restify/appPackage/manifest.json.tpl index 6c16ebcea5..a84fb3dad2 100644 --- a/templates/ts/notification-restify/appPackage/manifest.json.tpl +++ b/templates/ts/notification-restify/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/notification-timer-trigger/appPackage/manifest.json.tpl b/templates/ts/notification-timer-trigger/appPackage/manifest.json.tpl index 6cd99e825d..60f6f4e8f5 100644 --- a/templates/ts/notification-timer-trigger/appPackage/manifest.json.tpl +++ b/templates/ts/notification-timer-trigger/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false diff --git a/templates/ts/spfx-tab/appPackage/manifest.json.tpl b/templates/ts/spfx-tab/appPackage/manifest.json.tpl index 4afa184d20..47f53c74e6 100644 --- a/templates/ts/spfx-tab/appPackage/manifest.json.tpl +++ b/templates/ts/spfx-tab/appPackage/manifest.json.tpl @@ -1,7 +1,6 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", - "packageName": "com.microsoft.teams.extension", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "id": "${{TEAMS_APP_ID}}", "version": "1.0.0", "developer": { diff --git a/templates/ts/spfx-tab/appPackage/manifest.local.json.tpl b/templates/ts/spfx-tab/appPackage/manifest.local.json.tpl index 12dbd888f9..4edac3942e 100644 --- a/templates/ts/spfx-tab/appPackage/manifest.local.json.tpl +++ b/templates/ts/spfx-tab/appPackage/manifest.local.json.tpl @@ -1,7 +1,6 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", - "packageName": "com.microsoft.teams.extension", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "id": "${{TEAMS_APP_ID}}", "version": "1.0.0", "developer": { diff --git a/templates/ts/sso-tab-with-obo-flow/appPackage/manifest.json.tpl b/templates/ts/sso-tab-with-obo-flow/appPackage/manifest.json.tpl index 504b2770ca..685c1b910a 100644 --- a/templates/ts/sso-tab-with-obo-flow/appPackage/manifest.json.tpl +++ b/templates/ts/sso-tab-with-obo-flow/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "${{TAB_ENDPOINT}}", diff --git a/templates/ts/workflow/appPackage/manifest.json.tpl b/templates/ts/workflow/appPackage/manifest.json.tpl index 3cfba94e6f..cf2bbc13dc 100644 --- a/templates/ts/workflow/appPackage/manifest.json.tpl +++ b/templates/ts/workflow/appPackage/manifest.json.tpl @@ -1,9 +1,8 @@ { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", - "manifestVersion": "1.16", + "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json", + "manifestVersion": "1.17", "version": "1.0.0", "id": "${{TEAMS_APP_ID}}", - "packageName": "com.microsoft.teams.extension", "developer": { "name": "Teams App, Inc.", "websiteUrl": "https://www.example.com", @@ -29,7 +28,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "supportsFiles": false, "isNotificationOnly": false, @@ -38,7 +37,7 @@ "scopes": [ "personal", "team", - "groupchat" + "groupChat" ], "commands": [ {