@microsoft/teamsfx-core 1.8.0 → 1.8.1-alpha.324752dff.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/azure-hosting/azureFunctionHosting.d.ts +13 -0
- package/build/common/azure-hosting/azureFunctionHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/azureFunctionHosting.js +26 -0
- package/build/common/azure-hosting/azureFunctionHosting.js.map +1 -0
- package/build/common/azure-hosting/azureHosting.d.ts +14 -0
- package/build/common/azure-hosting/azureHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/azureHosting.js +66 -0
- package/build/common/azure-hosting/azureHosting.js.map +1 -0
- package/build/common/azure-hosting/botServiceHosting.d.ts +7 -0
- package/build/common/azure-hosting/botServiceHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/botServiceHosting.js +16 -0
- package/build/common/azure-hosting/botServiceHosting.js.map +1 -0
- package/build/common/azure-hosting/hostingFactory.d.ts +6 -0
- package/build/common/azure-hosting/hostingFactory.d.ts.map +1 -0
- package/build/common/azure-hosting/hostingFactory.js +22 -0
- package/build/common/azure-hosting/hostingFactory.js.map +1 -0
- package/build/common/azure-hosting/interfaces.d.ts +11 -0
- package/build/common/azure-hosting/interfaces.d.ts.map +1 -0
- package/build/common/azure-hosting/interfaces.js +12 -0
- package/build/common/azure-hosting/interfaces.js.map +1 -0
- package/build/common/azure-hosting/utils.d.ts +3 -0
- package/build/common/azure-hosting/utils.d.ts.map +1 -0
- package/build/common/azure-hosting/utils.js +26 -0
- package/build/common/azure-hosting/utils.js.map +1 -0
- package/build/common/constants.d.ts +1 -2
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +1 -2
- package/build/common/constants.js.map +1 -1
- package/build/common/deps-checker/constant/helpLink.d.ts +1 -0
- package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -1
- package/build/common/deps-checker/constant/helpLink.js +6 -5
- package/build/common/deps-checker/constant/helpLink.js.map +1 -1
- package/build/common/deps-checker/constant/telemetry.d.ts +2 -0
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
- package/build/common/deps-checker/constant/telemetry.js +2 -0
- package/build/common/deps-checker/constant/telemetry.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +2 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +7 -4
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +8 -4
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/featureFlags.d.ts +1 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +7 -6
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/local/constants.d.ts +1 -0
- package/build/common/local/constants.d.ts.map +1 -1
- package/build/common/local/constants.js +2 -1
- package/build/common/local/constants.js.map +1 -1
- package/build/common/local/projectSettingsHelper.d.ts +1 -0
- package/build/common/local/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/local/projectSettingsHelper.js +5 -0
- package/build/common/local/projectSettingsHelper.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts +3 -2
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +32 -4
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/samples-config.json +40 -6
- package/build/common/telemetry.d.ts +2 -3
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +1 -2
- package/build/common/telemetry.js.map +1 -1
- package/build/common/template-utils/templates.d.ts +1 -0
- package/build/common/template-utils/templates.d.ts.map +1 -1
- package/build/common/template-utils/templates.js +5 -1
- package/build/common/template-utils/templates.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts +4 -2
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +101 -11
- package/build/common/tools.js.map +1 -1
- package/build/component/bicep.d.ts +8 -0
- package/build/component/bicep.d.ts.map +1 -0
- package/build/component/bicep.js +111 -0
- package/build/component/bicep.js.map +1 -0
- package/build/component/botCode.d.ts +13 -0
- package/build/component/botCode.d.ts.map +1 -0
- package/build/component/botCode.js +138 -0
- package/build/component/botCode.js.map +1 -0
- package/build/component/connection.d.ts +8 -0
- package/build/component/connection.d.ts.map +1 -0
- package/build/component/connection.js +84 -0
- package/build/component/connection.js.map +1 -0
- package/build/component/core.d.ts +43 -0
- package/build/component/core.d.ts.map +1 -0
- package/build/component/core.js +714 -0
- package/build/component/core.js.map +1 -0
- package/build/component/debugManager.d.ts +8 -0
- package/build/component/debugManager.d.ts.map +1 -0
- package/build/component/debugManager.js +57 -0
- package/build/component/debugManager.js.map +1 -0
- package/build/component/envManager.d.ts +7 -0
- package/build/component/envManager.d.ts.map +1 -0
- package/build/component/envManager.js +140 -0
- package/build/component/envManager.js.map +1 -0
- package/build/component/projectSettingsManager.d.ts +10 -0
- package/build/component/projectSettingsManager.d.ts.map +1 -0
- package/build/component/projectSettingsManager.js +72 -0
- package/build/component/projectSettingsManager.js.map +1 -0
- package/build/component/resource/aad.d.ts +11 -0
- package/build/component/resource/aad.d.ts.map +1 -0
- package/build/component/resource/aad.js +82 -0
- package/build/component/resource/aad.js.map +1 -0
- package/build/component/resource/azureFunction.d.ts +19 -0
- package/build/component/resource/azureFunction.d.ts.map +1 -0
- package/build/component/resource/azureFunction.js +81 -0
- package/build/component/resource/azureFunction.js.map +1 -0
- package/build/component/resource/azureSql.d.ts +24 -0
- package/build/component/resource/azureSql.d.ts.map +1 -0
- package/build/component/resource/azureSql.js +101 -0
- package/build/component/resource/azureSql.js.map +1 -0
- package/build/component/resource/azureStorage.d.ts +16 -0
- package/build/component/resource/azureStorage.d.ts.map +1 -0
- package/build/component/resource/azureStorage.js +102 -0
- package/build/component/resource/azureStorage.js.map +1 -0
- package/build/component/resource/azureWebApp.d.ts +23 -0
- package/build/component/resource/azureWebApp.d.ts.map +1 -0
- package/build/component/resource/azureWebApp.js +95 -0
- package/build/component/resource/azureWebApp.js.map +1 -0
- package/build/component/resource/botService.d.ts +22 -0
- package/build/component/resource/botService.d.ts.map +1 -0
- package/build/component/resource/botService.js +208 -0
- package/build/component/resource/botService.js.map +1 -0
- package/build/component/resource/index.d.ts +17 -0
- package/build/component/resource/index.d.ts.map +1 -0
- package/build/component/resource/index.js +25 -0
- package/build/component/resource/index.js.map +1 -0
- package/build/component/resource/spfx.d.ts +9 -0
- package/build/component/resource/spfx.d.ts.map +1 -0
- package/build/component/resource/spfx.js +46 -0
- package/build/component/resource/spfx.js.map +1 -0
- package/build/component/resource/teamsManifest.d.ts +19 -0
- package/build/component/resource/teamsManifest.d.ts.map +1 -0
- package/build/component/resource/teamsManifest.js +135 -0
- package/build/component/resource/teamsManifest.js.map +1 -0
- package/build/component/utils.d.ts +18 -0
- package/build/component/utils.d.ts.map +1 -0
- package/build/component/utils.js +354 -0
- package/build/component/utils.js.map +1 -0
- package/build/component/workflow.d.ts +21 -0
- package/build/component/workflow.d.ts.map +1 -0
- package/build/component/workflow.js +445 -0
- package/build/component/workflow.js.map +1 -0
- package/build/core/FxCore.d.ts +2 -2
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +66 -117
- package/build/core/FxCore.js.map +1 -1
- package/build/core/downloadSample.d.ts.map +1 -1
- package/build/core/downloadSample.js +1 -6
- package/build/core/downloadSample.js.map +1 -1
- package/build/core/environment.d.ts +2 -1
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +20 -10
- package/build/core/environment.js.map +1 -1
- package/build/core/error.d.ts +0 -1
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +3 -7
- package/build/core/error.js.map +1 -1
- package/build/core/generateAadManifestTemplate.d.ts +10 -0
- package/build/core/generateAadManifestTemplate.d.ts.map +1 -0
- package/build/core/generateAadManifestTemplate.js +100 -0
- package/build/core/generateAadManifestTemplate.js.map +1 -0
- package/build/core/middleware/MigrationUtils.d.ts +10 -0
- package/build/core/middleware/MigrationUtils.d.ts.map +1 -0
- package/build/core/middleware/MigrationUtils.js +63 -0
- package/build/core/middleware/MigrationUtils.js.map +1 -0
- package/build/core/middleware/aadManifestMigration.d.ts.map +1 -1
- package/build/core/middleware/aadManifestMigration.js +33 -117
- package/build/core/middleware/aadManifestMigration.js.map +1 -1
- package/build/core/middleware/consolidateLocalRemote.d.ts.map +1 -1
- package/build/core/middleware/consolidateLocalRemote.js +75 -20
- package/build/core/middleware/consolidateLocalRemote.js.map +1 -1
- package/build/core/middleware/envInfoLoader.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoader.js +13 -3
- package/build/core/middleware/envInfoLoader.js.map +1 -1
- package/build/core/middleware/errorHandler.js +1 -1
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.d.ts +3 -0
- package/build/core/middleware/projectVersionChecker.d.ts.map +1 -0
- package/build/core/middleware/projectVersionChecker.js +55 -0
- package/build/core/middleware/projectVersionChecker.js.map +1 -0
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +85 -28
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/middleware/questionModelV3.d.ts +6 -0
- package/build/core/middleware/questionModelV3.d.ts.map +1 -0
- package/build/core/middleware/questionModelV3.js +66 -0
- package/build/core/middleware/questionModelV3.js.map +1 -0
- package/build/core/question.d.ts +8 -0
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +105 -11
- package/build/core/question.js.map +1 -1
- package/build/plugins/resource/aad/aadAppClient.d.ts +1 -1
- package/build/plugins/resource/aad/aadAppClient.d.ts.map +1 -1
- package/build/plugins/resource/aad/aadAppClient.js +20 -11
- package/build/plugins/resource/aad/aadAppClient.js.map +1 -1
- package/build/plugins/resource/aad/errors.d.ts +1 -0
- package/build/plugins/resource/aad/errors.d.ts.map +1 -1
- package/build/plugins/resource/aad/errors.js +8 -1
- package/build/plugins/resource/aad/errors.js.map +1 -1
- package/build/plugins/resource/aad/plugin.d.ts +1 -1
- package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
- package/build/plugins/resource/aad/plugin.js +22 -62
- package/build/plugins/resource/aad/plugin.js.map +1 -1
- package/build/plugins/resource/aad/utils/configs.d.ts +1 -1
- package/build/plugins/resource/aad/utils/configs.d.ts.map +1 -1
- package/build/plugins/resource/aad/utils/configs.js +13 -7
- package/build/plugins/resource/aad/utils/configs.js.map +1 -1
- package/build/plugins/resource/apiconnector/checker.d.ts +1 -0
- package/build/plugins/resource/apiconnector/checker.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/checker.js +22 -3
- package/build/plugins/resource/apiconnector/checker.js.map +1 -1
- package/build/plugins/resource/apiconnector/depsHandler.d.ts +1 -0
- package/build/plugins/resource/apiconnector/depsHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/depsHandler.js +22 -2
- package/build/plugins/resource/apiconnector/depsHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/envHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/envHandler.js +10 -1
- package/build/plugins/resource/apiconnector/envHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/errors.d.ts +4 -0
- package/build/plugins/resource/apiconnector/errors.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/errors.js +5 -1
- package/build/plugins/resource/apiconnector/errors.js.map +1 -1
- package/build/plugins/resource/apiconnector/index.d.ts +3 -3
- package/build/plugins/resource/apiconnector/index.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/index.js +7 -4
- package/build/plugins/resource/apiconnector/index.js.map +1 -1
- package/build/plugins/resource/apiconnector/plugin.d.ts +2 -2
- package/build/plugins/resource/apiconnector/plugin.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/plugin.js +21 -14
- package/build/plugins/resource/apiconnector/plugin.js.map +1 -1
- package/build/plugins/resource/apiconnector/questions.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/questions.js +6 -2
- package/build/plugins/resource/apiconnector/questions.js.map +1 -1
- package/build/plugins/resource/apiconnector/result.d.ts +4 -3
- package/build/plugins/resource/apiconnector/result.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/result.js.map +1 -1
- package/build/plugins/resource/apiconnector/sampleHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/sampleHandler.js +1 -0
- package/build/plugins/resource/apiconnector/sampleHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/telemetry.js +1 -1
- package/build/plugins/resource/apim/constants.d.ts +1 -0
- package/build/plugins/resource/apim/constants.d.ts.map +1 -1
- package/build/plugins/resource/apim/constants.js +1 -0
- package/build/plugins/resource/apim/constants.js.map +1 -1
- package/build/plugins/resource/apim/index.d.ts.map +1 -1
- package/build/plugins/resource/apim/index.js +2 -1
- package/build/plugins/resource/apim/index.js.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.js +1 -1
- package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
- package/build/plugins/resource/appstudio/constants.d.ts +2 -0
- package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/constants.js +2 -0
- package/build/plugins/resource/appstudio/constants.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +9 -3
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/v3/index.js +1 -1
- package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
- package/build/plugins/resource/bot/appStudio/appStudio.d.ts +4 -0
- package/build/plugins/resource/bot/appStudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/bot/appStudio/appStudio.js +14 -3
- package/build/plugins/resource/bot/appStudio/appStudio.js.map +1 -1
- package/build/plugins/resource/bot/azureOps.d.ts +1 -0
- package/build/plugins/resource/bot/azureOps.d.ts.map +1 -1
- package/build/plugins/resource/bot/azureOps.js +3 -2
- package/build/plugins/resource/bot/azureOps.js.map +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.js +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.js.map +1 -1
- package/build/plugins/resource/bot/constants.d.ts +2 -1
- package/build/plugins/resource/bot/constants.d.ts.map +1 -1
- package/build/plugins/resource/bot/constants.js +2 -1
- package/build/plugins/resource/bot/constants.js.map +1 -1
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +3 -1
- package/build/plugins/resource/bot/index.js.map +1 -1
- package/build/plugins/resource/bot/question.d.ts +1 -2
- package/build/plugins/resource/bot/question.d.ts.map +1 -1
- package/build/plugins/resource/bot/question.js +17 -3
- package/build/plugins/resource/bot/question.js.map +1 -1
- package/build/plugins/resource/bot/resources/strings.d.ts +1 -0
- package/build/plugins/resource/bot/resources/strings.d.ts.map +1 -1
- package/build/plugins/resource/bot/utils/common.d.ts +2 -0
- package/build/plugins/resource/bot/utils/common.d.ts.map +1 -1
- package/build/plugins/resource/bot/utils/common.js +14 -1
- package/build/plugins/resource/bot/utils/common.js.map +1 -1
- package/build/plugins/resource/bot/v2/common.d.ts +10 -0
- package/build/plugins/resource/bot/v2/common.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/common.js +70 -0
- package/build/plugins/resource/bot/v2/common.js.map +1 -0
- package/build/plugins/resource/bot/v2/enum.d.ts +6 -0
- package/build/plugins/resource/bot/v2/enum.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/enum.js +12 -0
- package/build/plugins/resource/bot/v2/enum.js.map +1 -0
- package/build/plugins/resource/bot/v2/index.d.ts +2 -0
- package/build/plugins/resource/bot/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/v2/index.js +14 -0
- package/build/plugins/resource/bot/v2/index.js.map +1 -1
- package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.d.ts +10 -0
- package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.js +5 -0
- package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.js.map +1 -0
- package/build/plugins/resource/bot/v2/mapping.d.ts +7 -0
- package/build/plugins/resource/bot/v2/mapping.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/mapping.js +74 -0
- package/build/plugins/resource/bot/v2/mapping.js.map +1 -0
- package/build/plugins/resource/bot/v2/plugin.d.ts +16 -0
- package/build/plugins/resource/bot/v2/plugin.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/plugin.js +129 -0
- package/build/plugins/resource/bot/v2/plugin.js.map +1 -0
- package/build/plugins/resource/bot/v2/scaffold.d.ts +3 -0
- package/build/plugins/resource/bot/v2/scaffold.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/scaffold.js +40 -0
- package/build/plugins/resource/bot/v2/scaffold.js.map +1 -0
- package/build/plugins/resource/cicd/index.d.ts.map +1 -1
- package/build/plugins/resource/cicd/index.js +29 -9
- package/build/plugins/resource/cicd/index.js.map +1 -1
- package/build/plugins/resource/cicd/questions.d.ts +2 -0
- package/build/plugins/resource/cicd/questions.d.ts.map +1 -1
- package/build/plugins/resource/cicd/questions.js +3 -1
- package/build/plugins/resource/cicd/questions.js.map +1 -1
- package/build/plugins/resource/cicd/utils/existingTemplatesStat.d.ts +16 -0
- package/build/plugins/resource/cicd/utils/existingTemplatesStat.d.ts.map +1 -0
- package/build/plugins/resource/cicd/utils/existingTemplatesStat.js +75 -0
- package/build/plugins/resource/cicd/utils/existingTemplatesStat.js.map +1 -0
- package/build/plugins/resource/frontend/dotnet/constants.d.ts +0 -10
- package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.js +1 -12
- package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/enum.d.ts +0 -10
- package/build/plugins/resource/frontend/dotnet/enum.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/enum.js +1 -12
- package/build/plugins/resource/frontend/dotnet/enum.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/ops/scaffold.js +2 -2
- package/build/plugins/resource/frontend/dotnet/ops/scaffold.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.js +9 -24
- package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.d.ts +2 -7
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.js +5 -31
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.js.map +1 -1
- package/build/plugins/resource/frontend/resources/errors.js +2 -2
- package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
- package/build/plugins/resource/function/constants.d.ts +1 -2
- package/build/plugins/resource/function/constants.d.ts.map +1 -1
- package/build/plugins/resource/function/constants.js +0 -1
- package/build/plugins/resource/function/constants.js.map +1 -1
- package/build/plugins/resource/function/enums.d.ts +2 -6
- package/build/plugins/resource/function/enums.d.ts.map +1 -1
- package/build/plugins/resource/function/enums.js +2 -7
- package/build/plugins/resource/function/enums.js.map +1 -1
- package/build/plugins/resource/function/language-strategy.d.ts +0 -3
- package/build/plugins/resource/function/language-strategy.d.ts.map +1 -1
- package/build/plugins/resource/function/language-strategy.js +0 -11
- package/build/plugins/resource/function/language-strategy.js.map +1 -1
- package/build/plugins/resource/function/ops/provision.d.ts +1 -5
- package/build/plugins/resource/function/ops/provision.d.ts.map +1 -1
- package/build/plugins/resource/function/ops/provision.js +0 -29
- package/build/plugins/resource/function/ops/provision.js.map +1 -1
- package/build/plugins/resource/function/plugin.d.ts +1 -3
- package/build/plugins/resource/function/plugin.d.ts.map +1 -1
- package/build/plugins/resource/function/plugin.js +8 -33
- package/build/plugins/resource/function/plugin.js.map +1 -1
- package/build/plugins/resource/function/resources/errors.js +2 -2
- package/build/plugins/resource/function/resources/errors.js.map +1 -1
- package/build/plugins/resource/function/v3/index.d.ts +1 -1
- package/build/plugins/resource/function/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/function/v3/index.js +9 -12
- package/build/plugins/resource/function/v3/index.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +5 -7
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/constants.d.ts +13 -2
- package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/constants.js +13 -1
- package/build/plugins/solution/fx-solution/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/error.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/error.js +7 -1
- package/build/plugins/solution/fx-solution/debug/error.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js +17 -0
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.js +32 -29
- package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts +1 -0
- package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js +49 -9
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/settings.d.ts +2 -1
- package/build/plugins/solution/fx-solution/debug/util/settings.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/settings.js +22 -2
- package/build/plugins/solution/fx-solution/debug/util/settings.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.d.ts +1 -0
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.js +40 -2
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/question.d.ts +12 -1
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +130 -22
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.js +1 -1
- package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.js +37 -4
- package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +113 -65
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts +6 -0
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +277 -2
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.js +48 -20
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js +8 -5
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/publish.js +1 -1
- package/build/plugins/solution/fx-solution/v2/publish.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.js +4 -1
- package/build/plugins/solution/fx-solution/v2/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.d.ts +7 -0
- package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +23 -1
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/package.json +8 -3
- package/resource/aad-manifest-change-logs.md +27 -0
- package/resource/package.nls.json +93 -54
- package/resource/{unify-config-change-logs.md → unify-config-and-aad-manifest-change-logs.md} +10 -3
- package/templates/bicep/azureSql.parameters.json +4 -0
- package/templates/bicep/azureSql.provisionDatabase.module.bicep +15 -0
- package/templates/bicep/azureSql.provisionDatabase.orchestration.bicep +5 -0
- package/templates/bicep/azureSql.provisionServer.module.bicep +44 -0
- package/templates/bicep/azureSql.provisionServer.orchestration.bicep +14 -0
- package/templates/bicep/azureWebApp.config.module.bicep +63 -0
- package/templates/bicep/azureWebApp.config.orchestration.bicep +12 -0
- package/templates/bicep/azureWebApp.parameters.json +4 -0
- package/templates/bicep/azureWebApp.provision.module.bicep +50 -0
- package/templates/bicep/azureWebApp.provision.orchestration.bicep +18 -0
- package/templates/bicep/botService.config.module.bicep +33 -0
- package/templates/bicep/botService.config.orchestration.bicep +8 -0
- package/templates/bicep/config.bicep +3 -0
- package/templates/bicep/main.bicep +18 -0
- package/templates/bicep/provision.bicep +2 -0
- package/templates/core/README.md +4 -4
- package/templates/fallback/blazor-base.csharp.default.zip +0 -0
- package/templates/fallback/bot.csharp.default.zip +0 -0
- package/templates/fallback/bot.csharp.notification-webapi.zip +0 -0
- package/templates/fallback/bot.js.command-and-response.zip +0 -0
- package/templates/fallback/bot.js.default.zip +0 -0
- package/templates/fallback/bot.js.m365.zip +0 -0
- package/templates/fallback/bot.js.notification-function-base.zip +0 -0
- package/templates/fallback/bot.js.notification-restify.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.command-and-response.zip +0 -0
- package/templates/fallback/bot.ts.default.zip +0 -0
- package/templates/fallback/bot.ts.m365.zip +0 -0
- package/templates/fallback/bot.ts.notification-function-base.zip +0 -0
- package/templates/fallback/bot.ts.notification-restify.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.notification.zip +0 -0
- package/templates/fallback/function-base.js.default.zip +0 -0
- package/templates/fallback/function-base.ts.default.zip +0 -0
- package/templates/fallback/function-triggers.js.HTTPTrigger.zip +0 -0
- package/templates/fallback/function-triggers.ts.HTTPTrigger.zip +0 -0
- package/templates/fallback/tab.csharp.default.zip +0 -0
- package/templates/fallback/tab.js.default.zip +0 -0
- package/templates/fallback/tab.js.m365.zip +0 -0
- package/templates/fallback/tab.js.non-sso.zip +0 -0
- package/templates/fallback/tab.ts.default.zip +0 -0
- package/templates/fallback/tab.ts.m365.zip +0 -0
- package/templates/fallback/tab.ts.non-sso.zip +0 -0
- package/templates/plugins/resource/aad/auth/bot/README.md +212 -9
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +4 -1
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-start.html +1 -0
- package/templates/plugins/resource/aad/auth/bot/js/sso/showUserInfo.js +19 -2
- package/templates/plugins/resource/aad/auth/bot/js/sso/ssoDialog.js +46 -18
- package/templates/plugins/resource/aad/auth/bot/js/sso/teamsSsoBot.js +13 -5
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +4 -1
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-start.html +1 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/showUserInfo.ts +15 -1
- package/templates/plugins/resource/aad/auth/bot/ts/sso/ssoDialog.ts +42 -11
- package/templates/plugins/resource/aad/auth/bot/ts/sso/teamsSsoBot.ts +7 -1
- package/templates/plugins/resource/aad/auth/tab/README.md +44 -8
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +1 -3
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +1 -3
- package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +23 -11
- package/templates/plugins/resource/aad/auth/tab/js/sso/InitTeamsFx.jsx +20 -0
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +1 -3
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +1 -3
- package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +25 -12
- package/templates/plugins/resource/aad/auth/tab/ts/sso/InitTeamsFx.tsx +20 -0
- package/templates/plugins/resource/apiconnector/package.json +1 -1
- package/templates/plugins/resource/apiconnector/sample/headerComment.template +20 -6
- package/templates/plugins/resource/apiconnector/sample/js/aad.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/js/apikey.template +2 -2
- package/templates/plugins/resource/apiconnector/sample/js/basic.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/js/cert.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/js/custom.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/ts/aad.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/ts/apikey.template +1 -1
- package/templates/plugins/resource/bot/bicep/funcHostedBotProvision.template.bicep +2 -2
- package/templates/plugins/resource/cicd/azdo/cd.yml +2 -1
- package/templates/plugins/resource/cicd/jenkins/Jenkinsfile.cd +2 -3
- package/templates/plugins/resource/function/bicep/functionProvision.template.bicep +2 -2
- package/templates/plugins/resource/hosting/bicep/botservice/botserviceProvision.template.bicep +34 -0
- package/templates/plugins/resource/hosting/bicep/botservice/parameters.json +4 -0
- package/templates/plugins/resource/hosting/bicep/botservice/provision.template.bicep +8 -0
- package/templates/plugins/resource/hosting/bicep/function/config.template.bicep +12 -0
- package/templates/plugins/resource/hosting/bicep/function/functionConfiguration.template.bicep +71 -0
- package/templates/plugins/resource/hosting/bicep/function/functionProvision.template.bicep +99 -0
- package/templates/plugins/resource/hosting/bicep/function/provision.template.bicep +20 -0
- package/templates/plugins/resource/keyvault/bicep/keyVaultProvision.template.bicep +1 -1
- package/templates/plugins/resource/spfx/solution/README.md +3 -3
- package/build/plugins/resource/function/utils/node-version.d.ts +0 -2
- package/build/plugins/resource/function/utils/node-version.d.ts.map +0 -1
- package/build/plugins/resource/function/utils/node-version.js +0 -21
- package/build/plugins/resource/function/utils/node-version.js.map +0 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
<!--This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on. -->
|
|
2
|
+
<!--This file is used during the Teams Bot authentication flow to assist with retrieval of the access token.-->
|
|
3
|
+
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
1
4
|
<html>
|
|
2
5
|
<head>
|
|
3
6
|
<title>Login End Page</title>
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
|
|
35
38
|
// Parse hash parameters into key-value pairs
|
|
36
39
|
function getHashParameters() {
|
|
37
|
-
let hashParams =
|
|
40
|
+
let hashParams = new Map();
|
|
38
41
|
location.hash
|
|
39
42
|
.substr(1)
|
|
40
43
|
.split("&")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!--This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on. -->
|
|
1
2
|
<!--This file is used during the Teams Bot authentication flow to assist with retrieval of the access token.-->
|
|
2
3
|
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
3
4
|
<html>
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
+
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
+
// This file implements a function to call Graph API with TeamsFx SDK to get user profile with SSO token.
|
|
3
|
+
// You can modify this file to add your business with SSO token.
|
|
4
|
+
// See https://aka.ms/teamsfx-add-sso to learn more about adding new command to your bot.
|
|
5
|
+
|
|
1
6
|
import { createMicrosoftGraphClient, TeamsFx } from "@microsoft/teamsfx";
|
|
2
7
|
import { TurnContext } from "botbuilder";
|
|
3
8
|
import { DialogTurnResult } from "botbuilder-dialogs";
|
|
4
9
|
|
|
10
|
+
// If you need extra parameters, you can add param in `addCommand`
|
|
5
11
|
export async function showUserInfo(
|
|
6
12
|
context: TurnContext,
|
|
7
|
-
ssoToken: string
|
|
13
|
+
ssoToken: string,
|
|
14
|
+
param: any[]
|
|
8
15
|
): Promise<DialogTurnResult> {
|
|
9
16
|
await context.sendActivity("Retrieving user information from Microsoft Graph ...");
|
|
17
|
+
|
|
18
|
+
// Init TeamsFx instance with SSO token
|
|
10
19
|
const teamsfx = new TeamsFx().setSsoToken(ssoToken);
|
|
20
|
+
|
|
21
|
+
// Add scope for your Azure AD app. For example: Mail.Read, etc.
|
|
11
22
|
const graphClient = createMicrosoftGraphClient(teamsfx, ["User.Read"]);
|
|
23
|
+
|
|
24
|
+
// Call graph api use `graph` instance to get user profile information
|
|
12
25
|
const me = await graphClient.api("/me").get();
|
|
13
26
|
if (me) {
|
|
27
|
+
// Bot will send the user profile info to user
|
|
14
28
|
await context.sendActivity(
|
|
15
29
|
`You're logged in as ${me.displayName} (${me.userPrincipalName})${
|
|
16
30
|
me.jobTitle ? `; your job title is: ${me.jobTitle}` : ""
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
+
// This file implements a `ComponentDialog` class for Single Sign On.
|
|
3
|
+
// See https://docs.microsoft.com/javascript/api/botbuilder-dialogs/componentdialog?view=botbuilder-ts-latest for more about `ComponentDialog`.
|
|
4
|
+
// If you are not familiar with this, do not remove or update this file.
|
|
5
|
+
|
|
1
6
|
import {
|
|
2
7
|
ComponentDialog,
|
|
3
8
|
WaterfallDialog,
|
|
@@ -45,7 +50,12 @@ export class SsoDialog extends ComponentDialog {
|
|
|
45
50
|
public addCommand(
|
|
46
51
|
commandId: string,
|
|
47
52
|
commandText: string | RegExp,
|
|
48
|
-
operation: (
|
|
53
|
+
operation: (
|
|
54
|
+
context: TurnContext,
|
|
55
|
+
ssoToken: string,
|
|
56
|
+
...param: any[]
|
|
57
|
+
) => Promise<DialogTurnResult>,
|
|
58
|
+
...param: any[]
|
|
49
59
|
): void {
|
|
50
60
|
const dialog = new WaterfallDialog(commandId, [
|
|
51
61
|
this.ssoStep.bind(this),
|
|
@@ -53,12 +63,18 @@ export class SsoDialog extends ComponentDialog {
|
|
|
53
63
|
async (stepContext: any) => {
|
|
54
64
|
const tokenResponse: TeamsBotSsoPromptTokenResponse = stepContext.result;
|
|
55
65
|
const context: TurnContext = stepContext.context;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
66
|
+
try {
|
|
67
|
+
if (tokenResponse) {
|
|
68
|
+
await operation(context, tokenResponse.ssoToken, param);
|
|
69
|
+
} else {
|
|
70
|
+
await context.sendActivity("Failed to retrieve user token from conversation context.");
|
|
71
|
+
}
|
|
72
|
+
return await stepContext.endDialog();
|
|
73
|
+
} catch (error) {
|
|
59
74
|
await context.sendActivity("Failed to retrieve user token from conversation context.");
|
|
75
|
+
await context.sendActivity(error.message);
|
|
76
|
+
return await stepContext.endDialog();
|
|
60
77
|
}
|
|
61
|
-
return await stepContext.endDialog();
|
|
62
78
|
},
|
|
63
79
|
]);
|
|
64
80
|
|
|
@@ -99,20 +115,35 @@ export class SsoDialog extends ComponentDialog {
|
|
|
99
115
|
if (commandId) {
|
|
100
116
|
return await stepContext.beginDialog(commandId);
|
|
101
117
|
}
|
|
118
|
+
await stepContext.context.sendActivity(`Cannot find command: ${text}`);
|
|
102
119
|
return await stepContext.endDialog();
|
|
103
120
|
}
|
|
104
121
|
|
|
105
122
|
private async ssoStep(stepContext: any) {
|
|
106
|
-
|
|
123
|
+
try {
|
|
124
|
+
return await stepContext.beginDialog(TEAMS_SSO_PROMPT_ID);
|
|
125
|
+
} catch (error) {
|
|
126
|
+
const context = stepContext.context;
|
|
127
|
+
await context.sendActivity("Failed to run SSO step");
|
|
128
|
+
await context.sendActivity(error.message);
|
|
129
|
+
return await stepContext.endDialog();
|
|
130
|
+
}
|
|
107
131
|
}
|
|
108
132
|
|
|
109
133
|
private async dedupStep(stepContext: any) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
134
|
+
try {
|
|
135
|
+
const tokenResponse = stepContext.result;
|
|
136
|
+
// Only dedup after ssoStep to make sure that all Teams client would receive the login request
|
|
137
|
+
if (tokenResponse && (await this.shouldDedup(stepContext.context))) {
|
|
138
|
+
return Dialog.EndOfTurn;
|
|
139
|
+
}
|
|
140
|
+
return await stepContext.next(tokenResponse);
|
|
141
|
+
} catch (error) {
|
|
142
|
+
const context = stepContext.context;
|
|
143
|
+
await context.sendActivity("Failed to run dedup step");
|
|
144
|
+
await context.sendActivity(error.message);
|
|
145
|
+
return await stepContext.endDialog();
|
|
114
146
|
}
|
|
115
|
-
return await stepContext.next(tokenResponse);
|
|
116
147
|
}
|
|
117
148
|
|
|
118
149
|
public async onEndDialog(context: TurnContext) {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
+
// This file implements a `TeamsActivityHandler` class using `ssoDialog` and add `showUserInfo` as a command.
|
|
3
|
+
// See https://docs.microsoft.com/javascript/api/botbuilder/teamsactivityhandler?view=botbuilder-ts-latest for more about `TeamsActivityHandler`.
|
|
4
|
+
// You can add your own command that requires SSO in this file.
|
|
5
|
+
|
|
1
6
|
import {
|
|
2
7
|
BotState,
|
|
3
8
|
ConversationState,
|
|
@@ -33,7 +38,8 @@ export class TeamsSsoBot extends TeamsActivityHandler {
|
|
|
33
38
|
|
|
34
39
|
// Add commands that requires user authentication
|
|
35
40
|
this.dialog.addCommand("ShowUserProfile", "show", showUserInfo);
|
|
36
|
-
//
|
|
41
|
+
// Call the `addCommand` function to add more customized commands with your own parameters, e.g.
|
|
42
|
+
// this.dialog.addCommand("ManageToDo", new RegExp("todo\s*.*"), todoCmdHandler, param);
|
|
37
43
|
|
|
38
44
|
this.onMessage(async (context, next) => {
|
|
39
45
|
console.log("Running with Message Activity.");
|
|
@@ -1,15 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
# Enable single sign-on for tab applications
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Microsoft Teams provides a mechanism by which an application can obtain the signed-in Teams user token to access Microsoft Graph (and other APIs). Teams Toolkit facilitates this interaction by abstracting some of the Azure Active Directory flows and integrations behind some simple, high level APIs. This enables you to add single sign-on (SSO) features easily to your Teams application.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# Changes to your project
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
When you added the SSO feature to your application, Teams Toolkit updated your project to support SSO:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
After you successfully added SSO into your project, Teams Toolkit will create and modify some files that helps you implement SSO feature.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
| Action | File | Description |
|
|
12
|
+
| - | - | - |
|
|
13
|
+
| Create| `aad.template.json` under `templates/appPackage` | The Azure Active Directory application manifest that is used to register the application with AAD. |
|
|
14
|
+
| Modify | `manifest.template.json` under `templates/appPackage` | An `webApplicationInfo` object will be added into your Teams app manifest template. This field is required by Teams when enabling SSO. |
|
|
15
|
+
| Create | `auth/tab` | Reference code, redirect pages and a `README.md` file. These files are provided for reference. See below for more information. |
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
# Update your code to add SSO
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
As described above, the Teams Toolkit generated some configuration to set up your application for SSO, but you need to update your application business logic to take advantage of the SSO feature as appropriate.
|
|
20
|
+
|
|
21
|
+
1. Move `auth-start.html` and `auth-end.html` in `auth/public` folder to `tabs/public/`.
|
|
22
|
+
These two HTML files are used for auth redirects.
|
|
23
|
+
|
|
24
|
+
1. Move `sso` folder under `auth/tab` to `tabs/src/sso/`.
|
|
25
|
+
|
|
26
|
+
`InitTeamsFx`: This file implements a function that initialize TeamsFx SDK and will open `GetUserProfile` component after SDK is initialized.
|
|
27
|
+
|
|
28
|
+
`GetUserProfile`: This file implements a function that calls Microsoft Graph API to get user info.
|
|
29
|
+
|
|
30
|
+
1. Execute the following commands under `tabs/`: `npm install @microsoft/teamsfx-react`
|
|
31
|
+
1. Add the following lines to `tabs/src/components/sample/Welcome.*` to import `InitTeamsFx`:
|
|
32
|
+
```
|
|
33
|
+
import { InitTeamsFx } from "../../sso/InitTeamsFx";
|
|
34
|
+
```
|
|
35
|
+
1. Replace the following line: `<AddSSO />` with `<InitTeamsFx />` to replace the `AddSSO` component with `InitTeamsFx` component.
|
|
36
|
+
|
|
37
|
+
# Debug your application
|
|
38
|
+
|
|
39
|
+
You can debug your application by pressing F5.
|
|
40
|
+
|
|
41
|
+
Teams Toolkit will use the AAD manifest file to register a AAD application registered for SSO.
|
|
42
|
+
|
|
43
|
+
To learn more about Teams Toolkit local debug functionalities, refer to this [document](https://docs.microsoft.com/microsoftteams/platform/toolkit/debug-local).
|
|
44
|
+
|
|
45
|
+
# Customize AAD applications
|
|
46
|
+
|
|
47
|
+
The AAD [manifest](https://docs.microsoft.com/azure/active-directory/develop/reference-app-manifest) allows you to customize various aspects of your application registration. You can update the manifest as needed.
|
|
48
|
+
|
|
49
|
+
Follow this [document](https://aka.ms/teamsfx-aad-manifest#how-to-customize-the-aad-manifest-template) if you need to include additional API permissions to access your desired APIs.
|
|
50
|
+
|
|
51
|
+
Follow this [document](https://aka.ms/teamsfx-aad-manifest#How-to-view-the-AAD-app-on-the-Azure-portal) to view your AAD application in Azure Portal.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
<!--This file is
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<!--This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on. -->
|
|
4
2
|
<!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
|
|
5
3
|
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
6
4
|
<html>
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
<!--This file is
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<!--This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on. -->
|
|
4
2
|
<!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
|
|
5
3
|
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
6
4
|
<html>
|
|
@@ -1,22 +1,34 @@
|
|
|
1
|
+
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
+
// This file will use TeamsFx SDK to call Graph API to get user profile.
|
|
3
|
+
// Refer to this link to learn more: https://www.npmjs.com/package/@microsoft/teamsfx-react#calling-the-microsoft-graph-api.
|
|
4
|
+
|
|
1
5
|
import { Button } from "@fluentui/react-northstar";
|
|
2
|
-
import { useGraph
|
|
6
|
+
import { useGraph } from "@microsoft/teamsfx-react";
|
|
7
|
+
|
|
8
|
+
export function GetUserProfile(props) {
|
|
9
|
+
const { teamsfx } = {
|
|
10
|
+
teamsfx: undefined,
|
|
11
|
+
...props,
|
|
12
|
+
};
|
|
3
13
|
|
|
4
|
-
|
|
5
|
-
const { teamsfx } = useTeamsFx();
|
|
14
|
+
// For usage of useGraph(), please refer to: https://www.npmjs.com/package/@microsoft/teamsfx-react#usegraph.
|
|
6
15
|
const { loading, error, data, reload } = useGraph(
|
|
7
16
|
async (graph, teamsfx, scope) => {
|
|
8
17
|
// Call graph api directly to get user profile information
|
|
9
18
|
const profile = await graph.api("/me").get();
|
|
10
19
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
// You can also add following code to get your photo:
|
|
21
|
+
// let photoUrl = "";
|
|
22
|
+
// try {
|
|
23
|
+
// const photo = await graph.api("/me/photo/$value").get();
|
|
24
|
+
// photoUrl = URL.createObjectURL(photo);
|
|
25
|
+
// } catch {
|
|
26
|
+
// // Could not fetch photo from user's profile, return empty string as placeholder.
|
|
27
|
+
// }
|
|
28
|
+
return { profile };
|
|
19
29
|
},
|
|
30
|
+
// Add scope for your Azure AD app. For example: Mail.Read, etc.
|
|
31
|
+
// Use teamsfx instance from `InitTeamsFx`
|
|
20
32
|
{ scope: ["User.Read"], teamsfx: teamsfx }
|
|
21
33
|
);
|
|
22
34
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
+
// This file will initialize TeamsFx SDK and show `GetUserProfile` component after initialization.
|
|
3
|
+
|
|
4
|
+
import { useTeamsFx } from "@microsoft/teamsfx-react";
|
|
5
|
+
import { GetUserProfile } from "./GetUserProfile";
|
|
6
|
+
|
|
7
|
+
export function InitTeamsFx() {
|
|
8
|
+
// For usage of useTeamsFx(), please refer to: https://www.npmjs.com/package/@microsoft/teamsfx-react#useTeamsfx.
|
|
9
|
+
// You need to wait until `loading == false` to use TeamsFx SDK.
|
|
10
|
+
const { loading, error, teamsfx } = useTeamsFx();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
{!loading && error && (
|
|
15
|
+
<div className="error">Failed init TeamsFx. Please try again later.</div>
|
|
16
|
+
)}
|
|
17
|
+
{!loading && teamsfx && <GetUserProfile teamsfx={teamsfx} />}
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
<!--This file is
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<!--This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on. -->
|
|
4
2
|
<!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
|
|
5
3
|
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
6
4
|
<html>
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
<!--This file is
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<!--This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on. -->
|
|
4
2
|
<!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
|
|
5
3
|
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
6
4
|
<html>
|
|
@@ -1,22 +1,35 @@
|
|
|
1
|
+
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
+
// This file will use TeamsFx SDK to call Graph API to get user profile.
|
|
3
|
+
// Refer to this link to learn more: https://www.npmjs.com/package/@microsoft/teamsfx-react#calling-the-microsoft-graph-api.
|
|
4
|
+
|
|
1
5
|
import { Button } from "@fluentui/react-northstar";
|
|
2
|
-
import {
|
|
6
|
+
import { TeamsFx } from "@microsoft/teamsfx";
|
|
7
|
+
import { useGraph } from "@microsoft/teamsfx-react";
|
|
8
|
+
|
|
9
|
+
export function GetUserProfile(props: { teamsfx?: TeamsFx }) {
|
|
10
|
+
const { teamsfx } = {
|
|
11
|
+
teamsfx: undefined,
|
|
12
|
+
...props,
|
|
13
|
+
};
|
|
3
14
|
|
|
4
|
-
|
|
5
|
-
const { teamsfx } = useTeamsFx();
|
|
15
|
+
// For usage of useGraph(), please refer to: https://www.npmjs.com/package/@microsoft/teamsfx-react#usegraph.
|
|
6
16
|
const { loading, error, data, reload } = useGraph(
|
|
7
17
|
async (graph, teamsfx, scope) => {
|
|
8
|
-
// Call graph api
|
|
18
|
+
// Call graph api use `graph` instance to get user profile information
|
|
9
19
|
const profile = await graph.api("/me").get();
|
|
10
20
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
// You can also add following code to get your photo:
|
|
22
|
+
// let photoUrl = "";
|
|
23
|
+
// try {
|
|
24
|
+
// const photo = await graph.api("/me/photo/$value").get();
|
|
25
|
+
// photoUrl = URL.createObjectURL(photo);
|
|
26
|
+
// } catch {
|
|
27
|
+
// // Could not fetch photo from user's profile, return empty string as placeholder.
|
|
28
|
+
// }
|
|
29
|
+
return { profile };
|
|
19
30
|
},
|
|
31
|
+
// Add scope for your Azure AD app. For example: Mail.Read, etc.
|
|
32
|
+
// Use teamsfx instance from `InitTeamsFx`
|
|
20
33
|
{ scope: ["User.Read"], teamsfx: teamsfx }
|
|
21
34
|
);
|
|
22
35
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
+
// This file will initialize TeamsFx SDK and show `GetUserProfile` component after initialization.
|
|
3
|
+
|
|
4
|
+
import { useTeamsFx } from "@microsoft/teamsfx-react";
|
|
5
|
+
import { GetUserProfile } from "./GetUserProfile";
|
|
6
|
+
|
|
7
|
+
export function InitTeamsFx() {
|
|
8
|
+
// For usage of useTeamsFx(), please refer to: https://www.npmjs.com/package/@microsoft/teamsfx-react#useTeamsfx.
|
|
9
|
+
// You need to wait until `loading == false` to use TeamsFx SDK.
|
|
10
|
+
const { loading, error, teamsfx } = useTeamsFx();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
{!loading && error && (
|
|
15
|
+
<div className="error">Failed init TeamsFx. Please try again later.</div>
|
|
16
|
+
)}
|
|
17
|
+
{!loading && teamsfx && <GetUserProfile teamsfx={teamsfx} />}
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -6,15 +6,14 @@ Your next steps:
|
|
|
6
6
|
2. Add your user password to TEAMSFX_API_{{capitalName}}_PASSWORD in "{{component}}/.env.teamsfx.local".
|
|
7
7
|
{{else if (equals config.AuthConfig.AuthType "aad")}}
|
|
8
8
|
{{#if (equals config.AuthConfig.ReuseTeamsApp false)}}
|
|
9
|
-
2.
|
|
9
|
+
2. Replace "<your-api-scope>" in this file with actual scope required by the API.
|
|
10
|
+
3. Add your client secret to TEAMSFX_API_{{capitalName}}_CLIENT_SECRET in "{{component}}/.env.teamsfx.local".
|
|
10
11
|
{{else}}
|
|
11
12
|
2. Replace "<your-api-scope>" in this file with actual scope required by the API.
|
|
12
|
-
3.
|
|
13
|
-
4. Add the scope to "templates/appPackage/aad.template.json" in this project.
|
|
14
|
-
You can visit https://aka.ms/teamsfx-aad-manifest to learn more about the AAD app template.
|
|
13
|
+
3. Refer https://aka.ms/teamsfx-connect-api-with-aad for configuring AAD app and consent scopes.
|
|
15
14
|
{{/if}}
|
|
16
15
|
{{else if (equals config.AuthConfig.AuthType "apikey")}}
|
|
17
|
-
2. Add your API Key to TEAMSFX_API_{{capitalName}}
|
|
16
|
+
2. Add your API Key to TEAMSFX_API_{{capitalName}}_API_KEY in "{{component}}/.env.teamsfx.local".
|
|
18
17
|
{{else if (equals config.AuthConfig.AuthType "cert")}}
|
|
19
18
|
2. Add code to read your cert content and replace "<your-cert>" and "<your-private-key>" with actual value.
|
|
20
19
|
{{else if (equals config.AuthConfig.AuthType "custom")}}
|
|
@@ -23,7 +22,22 @@ Your next steps:
|
|
|
23
22
|
|
|
24
23
|
You can now import the API client (an Axios instance) in another file and call {{config.APIName}} APIs without worrying about authentication.
|
|
25
24
|
Here is an example for a GET request to "relative_path_of_target_api":
|
|
26
|
-
|
|
25
|
+
```
|
|
26
|
+
{{#if (equals languageExt "js")}}
|
|
27
|
+
const { {{config.APIName}}Client } = require("relative_path_to_this_file");
|
|
28
|
+
{{else}}
|
|
29
|
+
import { {{config.APIName}}Client } from "relative_path_to_this_file";
|
|
30
|
+
{{/if}}
|
|
31
|
+
|
|
32
|
+
const response = await {{config.APIName}}Client.get("relative_path_of_target_api");
|
|
33
|
+
// You only need to enter the relative path for your API.
|
|
34
|
+
// For example, if you want to call api https://my-api-endpoint/test, and inputted https://my-api-endpoint as API endpoint,
|
|
35
|
+
// the code will looks like: const response = await {{config.APIName}}Client.get("test");
|
|
36
|
+
|
|
37
|
+
const responseBody = response.data;
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If you added this API while local debugging, please stop local debugging and start again because local debugging will not hot reload changes to .env.teamsfx.local
|
|
27
41
|
|
|
28
42
|
You can refer https://aka.ms/teamsfx-connect-api to learn more.
|
|
29
43
|
*/
|
|
@@ -5,7 +5,7 @@ const teamsFx = new teamsfxSdk.TeamsFx();
|
|
|
5
5
|
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
6
6
|
const authProvider = new teamsfxSdk.ApiKeyProvider(
|
|
7
7
|
"{{config.AuthConfig.Name}}",
|
|
8
|
-
teamsFx.getConfig("
|
|
8
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_API_KEY"),
|
|
9
9
|
{{#if (equals config.AuthConfig.Location "request header")}}
|
|
10
10
|
teamsfxSdk.ApiKeyLocation.Header
|
|
11
11
|
{{else}}
|
|
@@ -16,4 +16,4 @@ const {{config.APIName}}Client = teamsfxSdk.createApiClient(
|
|
|
16
16
|
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
17
17
|
authProvider
|
|
18
18
|
);
|
|
19
|
-
|
|
19
|
+
module.exports.{{config.APIName}}Client = {{config.APIName}}Client;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
IdentityType,
|
|
6
6
|
} from "@microsoft/teamsfx";
|
|
7
7
|
|
|
8
|
-
// Loads current app's configuration
|
|
8
|
+
// Loads current app's configuration, the sample uses client credential flow to acquire token for your API.
|
|
9
9
|
{{#if (equals config.AuthConfig.ReuseTeamsApp true)}}
|
|
10
10
|
const teamsFx = new TeamsFx(IdentityType.App);
|
|
11
11
|
{{else}}
|
|
@@ -5,7 +5,7 @@ const teamsFx = new TeamsFx();
|
|
|
5
5
|
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
6
6
|
const authProvider = new ApiKeyProvider(
|
|
7
7
|
"{{config.AuthConfig.Name}}",
|
|
8
|
-
teamsFx.getConfig("
|
|
8
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_API_KEY"),
|
|
9
9
|
{{#if (equals config.AuthConfig.Location "request header")}}
|
|
10
10
|
ApiKeyLocation.Header
|
|
11
11
|
{{else}}
|
|
@@ -70,7 +70,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
70
70
|
}
|
|
71
71
|
{
|
|
72
72
|
name: 'FUNCTIONS_EXTENSION_VERSION'
|
|
73
|
-
value: '~
|
|
73
|
+
value: '~4' // Use Azure Functions runtime v4
|
|
74
74
|
}
|
|
75
75
|
{
|
|
76
76
|
name: 'FUNCTIONS_WORKER_RUNTIME'
|
|
@@ -86,7 +86,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
86
86
|
}
|
|
87
87
|
{
|
|
88
88
|
name: 'WEBSITE_NODE_DEFAULT_VERSION'
|
|
89
|
-
value: '~
|
|
89
|
+
value: '~16' // Set NodeJS version to 16.x
|
|
90
90
|
}
|
|
91
91
|
{
|
|
92
92
|
name: 'RUNNING_ON_AZURE'
|
|
@@ -21,8 +21,9 @@ steps:
|
|
|
21
21
|
M365_ACCOUNT_NAME: $(M365_ACCOUNT_NAME)
|
|
22
22
|
M365_ACCOUNT_PASSWORD: $(M365_ACCOUNT_PASSWORD)
|
|
23
23
|
M365_TENANT_ID: $(M365_TENANT_ID)
|
|
24
|
-
CI_ENABLED: 'true'
|
|
25
24
|
<%/hosting_type_contains_spfx%>
|
|
25
|
+
# To enable M365 account login by environment variables and non-interactive mode.
|
|
26
|
+
CI_ENABLED: 'true'
|
|
26
27
|
TEAMSFX_ENV_NAME: <%env_name%>
|
|
27
28
|
inputs:
|
|
28
29
|
targetType: 'inline'
|
|
@@ -15,10 +15,9 @@ pipeline {
|
|
|
15
15
|
M365_ACCOUNT_NAME = credentials('M365_ACCOUNT_NAME')
|
|
16
16
|
M365_ACCOUNT_PASSWORD = credentials('M365_ACCOUNT_PASSWORD')
|
|
17
17
|
M365_TENANT_ID = credentials('M365_TENANT_ID')
|
|
18
|
-
// To enable M365 account login by non-interactive mode.
|
|
19
|
-
CI_ENABLED = 'true'
|
|
20
18
|
<%/hosting_type_contains_spfx%>
|
|
21
|
-
|
|
19
|
+
// To enable M365 account login by environment variables and non-interactive mode.
|
|
20
|
+
CI_ENABLED = 'true'
|
|
22
21
|
// To specify the env name for multi-env feature.
|
|
23
22
|
TEAMSFX_ENV_NAME = '<%env_name%>'
|
|
24
23
|
}
|
|
@@ -40,7 +40,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
40
40
|
}
|
|
41
41
|
{
|
|
42
42
|
name: 'FUNCTIONS_EXTENSION_VERSION'
|
|
43
|
-
value: '~
|
|
43
|
+
value: '~4' // Use Azure Functions runtime v4
|
|
44
44
|
}
|
|
45
45
|
{
|
|
46
46
|
name: 'FUNCTIONS_WORKER_RUNTIME'
|
|
@@ -56,7 +56,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
56
56
|
}
|
|
57
57
|
{
|
|
58
58
|
name: 'WEBSITE_NODE_DEFAULT_VERSION'
|
|
59
|
-
value: '~
|
|
59
|
+
value: '~16' // Set NodeJS version to 16.x
|
|
60
60
|
}
|
|
61
61
|
]
|
|
62
62
|
ftpsState: 'FtpsOnly'
|
package/templates/plugins/resource/hosting/bicep/botservice/botserviceProvision.template.bicep
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
param botEndpoint string
|
|
4
|
+
|
|
5
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
6
|
+
var botAadAppClientId = provisionParameters['botAadAppClientId'] // Read AAD app client id for Azure Bot Service from parameters
|
|
7
|
+
var botServiceName = contains(provisionParameters, 'botServiceName') ? provisionParameters['botServiceName'] : '${resourceBaseName}' // Try to read name for Azure Bot Service from parameters
|
|
8
|
+
var botServiceSku = contains(provisionParameters, 'botServiceSku') ? provisionParameters['botServiceSku'] : 'F0' // Try to read SKU for Azure Bot Service from parameters
|
|
9
|
+
var botDisplayName = contains(provisionParameters, 'botDisplayName') ? provisionParameters['botDisplayName'] : '${resourceBaseName}' // Try to read display name for Azure Bot Service from parameters
|
|
10
|
+
|
|
11
|
+
// Register your web service as a bot with the Bot Framework
|
|
12
|
+
resource botService 'Microsoft.BotService/botServices@2021-03-01' = {
|
|
13
|
+
kind: 'azurebot'
|
|
14
|
+
location: 'global'
|
|
15
|
+
name: botServiceName
|
|
16
|
+
properties: {
|
|
17
|
+
displayName: botDisplayName
|
|
18
|
+
endpoint: uri(botEndpoint, '/api/messages')
|
|
19
|
+
msaAppId: botAadAppClientId
|
|
20
|
+
}
|
|
21
|
+
sku: {
|
|
22
|
+
name: botServiceSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add botServiceSku property to provisionParameters to override the default value "F0".
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Connect the bot service to Microsoft Teams
|
|
27
|
+
resource botServiceMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
|
|
28
|
+
parent: botService
|
|
29
|
+
location: 'global'
|
|
30
|
+
name: 'MsTeamsChannel'
|
|
31
|
+
properties: {
|
|
32
|
+
channelName: 'MsTeamsChannel'
|
|
33
|
+
}
|
|
34
|
+
}
|