@microsoft/teamsfx-core 2.0.12-alpha.dc2ed64c9.0 → 2.0.12-alpha.decc8f69b.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/client/teamsDevPortalClient.js +2 -1
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/common/secretmasker/masker.d.ts +1 -1
- package/build/common/secretmasker/masker.d.ts.map +1 -1
- package/build/common/secretmasker/masker.js +2 -2
- package/build/common/secretmasker/masker.js.map +1 -1
- package/build/common/stringUtils.js +1 -1
- package/build/common/stringUtils.js.map +1 -1
- package/build/common/templates-config.json +1 -1
- package/build/component/configManager/actionInjector.d.ts +8 -3
- package/build/component/configManager/actionInjector.d.ts.map +1 -1
- package/build/component/configManager/actionInjector.js +80 -14
- package/build/component/configManager/actionInjector.js.map +1 -1
- package/build/component/constants.d.ts +1 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +1 -0
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +7 -3
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/deps-checker/internal/nodeChecker.js +1 -1
- package/build/component/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/component/driver/apiKey/create.js +1 -1
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/apiKey/error/apiKeyAuthMissingInSpec.d.ts +5 -0
- package/build/component/driver/apiKey/error/apiKeyAuthMissingInSpec.d.ts.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyAuthMissingInSpec.js +23 -0
- package/build/component/driver/apiKey/error/apiKeyAuthMissingInSpec.js.map +1 -0
- package/build/component/driver/apiKey/update.js +1 -1
- package/build/component/driver/apiKey/update.js.map +1 -1
- package/build/component/driver/apiKey/utility/utility.d.ts +1 -1
- package/build/component/driver/apiKey/utility/utility.d.ts.map +1 -1
- package/build/component/driver/apiKey/utility/utility.js +10 -11
- package/build/component/driver/apiKey/utility/utility.js.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts +0 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js +12 -7
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
- package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js +1 -1
- package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js.map +1 -1
- package/build/component/driver/oauth/error/oauthAuthMissingInSpec.d.ts +5 -0
- package/build/component/driver/oauth/error/oauthAuthMissingInSpec.d.ts.map +1 -0
- package/build/component/driver/oauth/error/oauthAuthMissingInSpec.js +21 -0
- package/build/component/driver/oauth/error/oauthAuthMissingInSpec.js.map +1 -0
- package/build/component/driver/oauth/utility/utility.d.ts.map +1 -1
- package/build/component/driver/oauth/utility/utility.js +5 -1
- package/build/component/driver/oauth/utility/utility.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +0 -1
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +27 -19
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.js +2 -0
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +2 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +36 -5
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +22 -15
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +2 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +20 -4
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +2 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts +5 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +90 -0
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/generator/apiSpec/generator.d.ts.map +1 -1
- package/build/component/generator/apiSpec/generator.js +17 -7
- package/build/component/generator/apiSpec/generator.js.map +1 -1
- package/build/component/generator/apiSpec/helper.d.ts +5 -1
- package/build/component/generator/apiSpec/helper.d.ts.map +1 -1
- package/build/component/generator/apiSpec/helper.js +120 -33
- package/build/component/generator/apiSpec/helper.js.map +1 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +1 -0
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +5 -6
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +2 -2
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +1 -1
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +1 -1
- package/build/component/generator/templates/templateNames.js +3 -3
- package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.js +1 -0
- package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
- package/build/component/m365/launchHelper.d.ts.map +1 -1
- package/build/component/m365/launchHelper.js +4 -0
- package/build/component/m365/launchHelper.js.map +1 -1
- package/build/component/provisionUtils.d.ts.map +1 -1
- package/build/component/provisionUtils.js +2 -1
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +0 -1
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/envFunctionUtils.js +3 -2
- package/build/component/utils/envFunctionUtils.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts +1 -0
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +7 -0
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/core/FxCore.d.ts +8 -1
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +154 -23
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +5 -2
- package/build/core/collaborator.js.map +1 -1
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +16 -5
- package/build/question/constants.js.map +1 -1
- package/build/question/index.d.ts +1 -0
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +3 -0
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +1 -1
- package/build/question/options/CreateProjectOptions.js +2 -2
- package/build/question/other.d.ts +1 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +13 -5
- package/build/question/other.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/resource/package.nls.json +12 -7
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/bot/README.md +27 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/teamsfx-core",
|
|
3
|
-
"version": "2.0.12-alpha.
|
|
3
|
+
"version": "2.0.12-alpha.decc8f69b.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -93,12 +93,12 @@
|
|
|
93
93
|
"@azure/core-auth": "^1.4.0",
|
|
94
94
|
"@azure/identity": "^4.1.0",
|
|
95
95
|
"@azure/msal-node": "^2.6.6",
|
|
96
|
-
"@azure/storage-blob": "^12.
|
|
96
|
+
"@azure/storage-blob": "^12.25.0",
|
|
97
97
|
"@feathersjs/hooks": "^0.6.5",
|
|
98
98
|
"@microsoft/dev-tunnels-contracts": "1.1.9",
|
|
99
99
|
"@microsoft/dev-tunnels-management": "1.1.9",
|
|
100
|
-
"@microsoft/m365-spec-parser": "^0.2.3-alpha.
|
|
101
|
-
"@microsoft/teamsfx-api": "0.23.3-alpha.
|
|
100
|
+
"@microsoft/m365-spec-parser": "^0.2.3-alpha.decc8f69b.0",
|
|
101
|
+
"@microsoft/teamsfx-api": "0.23.3-alpha.decc8f69b.0",
|
|
102
102
|
"adm-zip": "^0.5.10",
|
|
103
103
|
"ajv": "^8.5.0",
|
|
104
104
|
"axios": "^1.7.5",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"mustache": "^4.1.0",
|
|
124
124
|
"node-fetch": "2.7.0",
|
|
125
125
|
"node-forge": "^1.3.1",
|
|
126
|
-
"office-addin-manifest": "^1.13.
|
|
127
|
-
"office-addin-project": "^0.
|
|
126
|
+
"office-addin-manifest": "^1.13.5",
|
|
127
|
+
"office-addin-project": "^1.0.0",
|
|
128
128
|
"openapi-types": "^7.2.3",
|
|
129
129
|
"proper-lockfile": "^4.1.2",
|
|
130
130
|
"read-package-json-fast": "^2.0.3",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"resource/**/*",
|
|
218
218
|
"templates/**/*"
|
|
219
219
|
],
|
|
220
|
-
"gitHead": "
|
|
220
|
+
"gitHead": "43597e952ccc123d711808c043914bafb2f6b39b",
|
|
221
221
|
"publishConfig": {
|
|
222
222
|
"access": "public"
|
|
223
223
|
},
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"core.addApi.confirm": "Teams Toolkit will modify files in your \"%s\" folder based on the new OpenAPI document you provided. To avoid losing unexpected changes, back up your files or use git for change tracking before proceeding.",
|
|
3
|
+
"core.addApi.confirm.teamsYaml": "Teams Toolkit will modify files in your \"%s\" folder and \"%s\" based on the new OpenAPI document you provided. To avoid losing unexpected changes, back up your files or use git for change tracking before proceeding.",
|
|
4
|
+
"core.addApi.confirm.localTeamsYaml": "Teams Toolkit will modify files in your \"%s\" folder, \"%s\" and \"%s\" based on the new OpenAPI document you provided. To avoid losing unexpected changes, back up your files or use git for change tracking before proceeding.",
|
|
3
5
|
"core.addApi.continue": "Add",
|
|
4
6
|
"core.provision.provision": "Provision",
|
|
5
7
|
"core.provision.learnMore": "More info",
|
|
@@ -160,9 +162,9 @@
|
|
|
160
162
|
"plugins.bot.triggers.http-and-timer-functions.description": "Azure Functions",
|
|
161
163
|
"plugins.bot.triggers.http-and-timer-functions.detail": "A function running on Azure Functions can respond to HTTP requests based on a specific schedule.",
|
|
162
164
|
"plugins.bot.triggers.http-and-timer-functions.label": "HTTP and Timer Trigger",
|
|
163
|
-
"plugins.bot.triggers.http-
|
|
164
|
-
"plugins.bot.triggers.http-
|
|
165
|
-
"plugins.bot.triggers.http-
|
|
165
|
+
"plugins.bot.triggers.http-express.description": "Express Server",
|
|
166
|
+
"plugins.bot.triggers.http-express.detail": "An express server running on Azure App Service can respond to HTTP requests.",
|
|
167
|
+
"plugins.bot.triggers.http-express.label": "HTTP Trigger",
|
|
166
168
|
"plugins.bot.triggers.http-webapi.description": "Web API Server",
|
|
167
169
|
"plugins.bot.triggers.http-webapi.detail": "A Web API server running on Azure App Service can respond to HTTP requests.",
|
|
168
170
|
"plugins.bot.triggers.http-webapi.label": "HTTP Trigger",
|
|
@@ -212,6 +214,8 @@
|
|
|
212
214
|
"_error.appstudio.BotProvisionReturnsForbiddenResult.comment": "This is to describe API call, no need to translate 'Botframework'.",
|
|
213
215
|
"error.appstudio.BotProvisionReturnsConflictResult": "Botframework provisioning returns conflict result when attempting to create bot registration.",
|
|
214
216
|
"_error.appstudio.BotProvisionReturnsConflictResult.comment": "This is to describe API call, no need to translate 'Botframework'.",
|
|
217
|
+
"error.appstudio.localizationFile.pathNotDefined": "Localization file not found. Path: %s.",
|
|
218
|
+
"error.appstudio.localizationFile.validationException": "Unable to validate localization file due to errors. File: %s. Error: %s",
|
|
215
219
|
"error.generator.ScaffoldLocalTemplateError": "Unable to scaffold template based on local zip package.",
|
|
216
220
|
"error.generator.TemplateNotFoundError": "Unable to find template: %s.",
|
|
217
221
|
"error.generator.SampleNotFoundError": "Unable to find sample: %s.",
|
|
@@ -235,7 +239,6 @@
|
|
|
235
239
|
"core.option.github": "Open a GitHub guide",
|
|
236
240
|
"core.option.inProduct": "Open an in-product guide",
|
|
237
241
|
"core.TabOption.label": "Tab",
|
|
238
|
-
"core.generator.officeAddin.importProject.title": "Importing Existing Outlook Add-in Project",
|
|
239
242
|
"core.generator.officeAddin.importProject.copyFiles": "Copying files...",
|
|
240
243
|
"core.generator.officeAddin.importProject.convertProject": "Converting project...",
|
|
241
244
|
"core.generator.officeAddin.importProject.updateManifest": "Modifying manifest...",
|
|
@@ -271,6 +274,7 @@
|
|
|
271
274
|
"core.copilotPlugin.list.unsupportedBecause": "is unsupported because:",
|
|
272
275
|
"core.copilotPlugin.scaffold.summary": "We have detected the following issues for your OpenAPI description document:\n%s",
|
|
273
276
|
"core.copilotPlugin.scaffold.summary.warning.operationId": "%s Mitigation: Not required, operationId has been automatically generated and added into \"%s\" file.",
|
|
277
|
+
"core.copilotPlugin.scaffold.summary.warning.operationIdContainsSpecialCharacters": "Operation id '%s' in OpenAPI description document contained special characters and was renamed to '%s'.",
|
|
274
278
|
"core.copilotPlugin.scaffold.summary.warning.swaggerVersion": "The OpenAPI description document is on Swagger version 2.0. Mitigation: Not required. The content has been converted to OpenAPI 3.0 and saved in \"%s\".",
|
|
275
279
|
"core.copilotPlugin.scaffold.summary.warning.teamsManifest.lengthExceeding": "\"%s\" must not have more than %s characters. ",
|
|
276
280
|
"core.copilotPlugin.scaffold.summary.warning.teamsManifest.missingFullDescription": "Missing full description. ",
|
|
@@ -283,6 +287,7 @@
|
|
|
283
287
|
"core.copilotPlugin.scaffold.summary.warning.pluginManifest.missingFunctionDescription.mitigation": " Mitigation: Update description for \"%s\" in \"%s\"",
|
|
284
288
|
"core.copilotPlugin.scaffold.summary.warning.pluginManifest.functionDescription.lengthExceeding": "Description for function \"%s\" shortened to %s characters to meet the length requirement.",
|
|
285
289
|
"core.copilotPlugin.scaffold.summary.warning.pluginManifest.functionDescription.lengthExceeding.mitigation": " Mitigation: Update description for \"%s\" in \"%s\" so that Copilot can trigger the function.",
|
|
290
|
+
"core.copilotPlugin.scaffold.summary.warning.generate.ac.failed": "Failed to create the adaptive card for API '%s': %s. Mitigation: Not required but you can manually add it to the adaptiveCards folder.",
|
|
286
291
|
"core.createCapabilityQuestion.titleNew": "Capabilities",
|
|
287
292
|
"core.createCapabilityQuestion.placeholder": "Select a capability",
|
|
288
293
|
"core.createProjectQuestion.option.description.preview": "Preview",
|
|
@@ -524,8 +529,6 @@
|
|
|
524
529
|
"core.common.invalidReason.PostBodySchemaIsNotJson": "post body schema is not json",
|
|
525
530
|
"core.common.invalidReason.PostBodyContainsRequiredUnsupportedSchema": "post body contains required unsupported schema",
|
|
526
531
|
"core.common.invalidReason.ParamsContainRequiredUnsupportedSchema": "params contain required unsupported schema",
|
|
527
|
-
"core.common.invalidReason.ParamsContainsNestedObject": "params contain nested object",
|
|
528
|
-
"core.common.invalidReason.RequestBodyContainsNestedObject": "request body contains nested object",
|
|
529
532
|
"core.common.invalidReason.ExceededRequiredParamsLimit": "exceeded required params limit",
|
|
530
533
|
"core.common.invalidReason.NoParameter": "no parameter",
|
|
531
534
|
"core.common.invalidReason.NoAPIInfo": "no API info",
|
|
@@ -899,6 +902,7 @@
|
|
|
899
902
|
"driver.apiKey.error.clientSecretInvalid": "Invalid client secret. It should be 10 to 512 characters long.",
|
|
900
903
|
"driver.apiKey.error.domainInvalid": "Invalid domain. Please follow these rules: 1. Max %d domain(s) per API key. 2. Use comma to separate domains.",
|
|
901
904
|
"driver.apiKey.error.failedToGetDomain": "Unable to get domain from API specification. Make sure your API specification is valid.",
|
|
905
|
+
"driver.apiKey.error.authMissingInSpec": "No API in the OpenAPI specification file matches the API key authentication name '%s'. Please verify the name in the specification.",
|
|
902
906
|
"driver.apiKey.error.clientSecretFromScratchInvalid": "Invalid client secret. If you start with a new API, refer to the README file for details.",
|
|
903
907
|
"driver.apiKey.log.successCreateApiKey": "Created API key with id %s",
|
|
904
908
|
"driver.apiKey.log.failedExecuteDriver": "Unable to execute action %s. Error message: %s",
|
|
@@ -911,7 +915,8 @@
|
|
|
911
915
|
"driver.oauth.error.OauthIdentityProviderInvalid": "Invalid identity provider 'MicrosoftEntra'. Ensure the OAuth authorization endpoint in the OpenAPI specification file is for Microsoft Entra.",
|
|
912
916
|
"driver.oauth.log.successCreateOauth": "OAuth registration created successfully with id %s!",
|
|
913
917
|
"driver.oauth.error.domainInvalid": "Maximum %d domains allowed per OAuth registration.",
|
|
914
|
-
"driver.
|
|
918
|
+
"driver.oauth.error.oauthAuthInfoInvalid": "Unable to parse OAuth2 authScheme from spec. Make sure your API specification is valid.",
|
|
919
|
+
"driver.oauth.error.oauthAuthMissingInSpec": "No API in the OpenAPI specification file matches the OAuth authentication name '%s'. Please verify the name in the specification.",
|
|
915
920
|
"driver.oauth.log.skipUpdateOauth": "Skip updating OAuth registration as the same property exists.",
|
|
916
921
|
"driver.oauth.confirm.update": "The following parameters will be updated:\n%s\nDo you want to continue?",
|
|
917
922
|
"driver.oauth.log.successUpdateOauth": "OAuth registration updated successfully!",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -29,7 +29,7 @@ After you successfully added SSO into your project, Teams Toolkit will create an
|
|
|
29
29
|
| Modify | `azureWebAppBotConfig.bicep` under `templates/azure/teamsFx` and `azure.parameters.dev.json` under `.fx/configs` | Insert environment variables used for bot web app to enable SSO feature |
|
|
30
30
|
| 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. |
|
|
31
31
|
| Modify | `projectSettings.json` under `.fx/configs` | Add bot sso capability, which will be used internally by Teams Toolkit. |
|
|
32
|
-
| Create | `aad.template.json` under `templates/appPackage` | The Microsoft Entra application manifest that is used to register the application with Microsoft Entra.
|
|
32
|
+
| Create | `aad.template.json` under `templates/appPackage` | The Microsoft Entra application manifest that is used to register the application with Microsoft Entra. |
|
|
33
33
|
| Create | `auth/bot` | Reference code, redirect pages and a `README.md` file. These files are provided for reference. See below for more information. |
|
|
34
34
|
|
|
35
35
|
<h2 id='2'>Update your code to Use SSO for Bot</h2>
|
|
@@ -41,17 +41,22 @@ As described above, the Teams Toolkit generated some configuration to set up you
|
|
|
41
41
|
<h3 id='2.1'>Set up the Microsoft Entra redirects</h3>
|
|
42
42
|
|
|
43
43
|
1. Move the `auth/bot/public` folder to `bot/src`. This folder contains HTML pages that the bot application hosts. When single sign-on flows are initiated with Microsoft Entra, Microsoft Entra will redirect the user to these pages.
|
|
44
|
-
1. Modify your `bot/src/index` to add the appropriate `
|
|
44
|
+
1. Modify your `bot/src/index` to add the appropriate `express` routes to these pages.
|
|
45
45
|
|
|
46
46
|
```ts
|
|
47
47
|
const path = require("path");
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
const send = require("send");
|
|
49
|
+
|
|
50
|
+
expressApp.get(["/auth-start.html", "/auth-end.html"], async (req, res) => {
|
|
51
|
+
send(
|
|
52
|
+
req,
|
|
53
|
+
path.join(
|
|
54
|
+
__dirname,
|
|
55
|
+
"public",
|
|
56
|
+
req.url.includes("auth-start.html") ? "auth-start.html" : "auth-end.html"
|
|
57
|
+
)
|
|
58
|
+
).pipe(res);
|
|
59
|
+
});
|
|
55
60
|
```
|
|
56
61
|
|
|
57
62
|
<h3 id='2.2'>Update your business logic</h3>
|
|
@@ -337,13 +342,14 @@ You can update the query logic in the `handleMessageExtensionQueryWithSSO` with
|
|
|
337
342
|
To make this work in your application:
|
|
338
343
|
|
|
339
344
|
1. Move the `auth/bot/public` folder to `bot`. This folder contains HTML pages that the bot application hosts. When single sign-on flows are initiated with Microsoft Entra, Microsoft Entra will redirect the user to these pages.
|
|
340
|
-
1. Modify your `bot/index` to add the appropriate `
|
|
345
|
+
1. Modify your `bot/index` to add the appropriate `express` routes to these pages.
|
|
341
346
|
|
|
342
347
|
```ts
|
|
343
348
|
const path = require("path");
|
|
349
|
+
const send = require("send");
|
|
344
350
|
|
|
345
351
|
// Listen for incoming requests.
|
|
346
|
-
|
|
352
|
+
expressApp.post("/api/messages", async (req, res) => {
|
|
347
353
|
await adapter
|
|
348
354
|
.process(req, res, async (context) => {
|
|
349
355
|
await bot.run(context);
|
|
@@ -356,12 +362,16 @@ To make this work in your application:
|
|
|
356
362
|
});
|
|
357
363
|
});
|
|
358
364
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
+
expressApp.get(["/auth-start.html", "/auth-end.html"], async (req, res) => {
|
|
366
|
+
send(
|
|
367
|
+
req,
|
|
368
|
+
path.join(
|
|
369
|
+
__dirname,
|
|
370
|
+
"public",
|
|
371
|
+
req.url.includes("auth-start.html") ? "auth-start.html" : "auth-end.html"
|
|
372
|
+
)
|
|
373
|
+
).pipe(res);
|
|
374
|
+
});
|
|
365
375
|
```
|
|
366
376
|
|
|
367
377
|
1. Override `handleTeamsMessagingExtensionQuery` interface under `bot/teamsBot`. You can follow the sample code in the `handleMessageExtensionQueryWithSSO` to do your own query logic.
|