@microsoft/teamsfx-core 2.0.6-alpha.e5db52f29.0 → 2.0.6-alpha.e662467a1.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.
Files changed (301) hide show
  1. package/build/common/constants.d.ts +3 -2
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +3 -2
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/deps-checker/internal/funcToolChecker.d.ts +1 -1
  6. package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
  7. package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
  8. package/build/common/deps-checker/internal/testToolChecker.d.ts.map +1 -1
  9. package/build/common/deps-checker/internal/testToolChecker.js +9 -3
  10. package/build/common/deps-checker/internal/testToolChecker.js.map +1 -1
  11. package/build/common/featureFlags.d.ts +3 -4
  12. package/build/common/featureFlags.d.ts.map +1 -1
  13. package/build/common/featureFlags.js +10 -15
  14. package/build/common/featureFlags.js.map +1 -1
  15. package/build/common/local/localCertificateManager.d.ts +5 -4
  16. package/build/common/local/localCertificateManager.d.ts.map +1 -1
  17. package/build/common/local/localCertificateManager.js +9 -2
  18. package/build/common/local/localCertificateManager.js.map +1 -1
  19. package/build/common/m365/packageService.d.ts.map +1 -1
  20. package/build/common/m365/packageService.js +2 -1
  21. package/build/common/m365/packageService.js.map +1 -1
  22. package/build/common/samples.d.ts +8 -4
  23. package/build/common/samples.d.ts.map +1 -1
  24. package/build/common/samples.js +25 -26
  25. package/build/common/samples.js.map +1 -1
  26. package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -1
  27. package/build/common/spec-parser/adaptiveCardGenerator.js +2 -4
  28. package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -1
  29. package/build/common/spec-parser/constants.d.ts +8 -0
  30. package/build/common/spec-parser/constants.d.ts.map +1 -1
  31. package/build/common/spec-parser/constants.js +8 -0
  32. package/build/common/spec-parser/constants.js.map +1 -1
  33. package/build/common/spec-parser/index.browser.d.ts +6 -0
  34. package/build/common/spec-parser/index.browser.d.ts.map +1 -0
  35. package/build/common/spec-parser/index.browser.js +16 -0
  36. package/build/common/spec-parser/index.browser.js.map +1 -0
  37. package/build/common/spec-parser/index.d.ts +1 -1
  38. package/build/common/spec-parser/index.d.ts.map +1 -1
  39. package/build/common/spec-parser/index.js.map +1 -1
  40. package/build/common/spec-parser/interfaces.d.ts +19 -1
  41. package/build/common/spec-parser/interfaces.d.ts.map +1 -1
  42. package/build/common/spec-parser/interfaces.js +2 -1
  43. package/build/common/spec-parser/interfaces.js.map +1 -1
  44. package/build/common/spec-parser/manifestUpdater.d.ts +3 -2
  45. package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -1
  46. package/build/common/spec-parser/manifestUpdater.js +24 -10
  47. package/build/common/spec-parser/manifestUpdater.js.map +1 -1
  48. package/build/common/spec-parser/specFilter.d.ts +1 -1
  49. package/build/common/spec-parser/specFilter.d.ts.map +1 -1
  50. package/build/common/spec-parser/specFilter.js +2 -2
  51. package/build/common/spec-parser/specFilter.js.map +1 -1
  52. package/build/common/spec-parser/specParser.browser.d.ts +46 -0
  53. package/build/common/spec-parser/specParser.browser.d.ts.map +1 -0
  54. package/build/common/spec-parser/specParser.browser.js +138 -0
  55. package/build/common/spec-parser/specParser.browser.js.map +1 -0
  56. package/build/common/spec-parser/specParser.d.ts +3 -8
  57. package/build/common/spec-parser/specParser.d.ts.map +1 -1
  58. package/build/common/spec-parser/specParser.js +88 -49
  59. package/build/common/spec-parser/specParser.js.map +1 -1
  60. package/build/common/spec-parser/utils.d.ts +10 -7
  61. package/build/common/spec-parser/utils.d.ts.map +1 -1
  62. package/build/common/spec-parser/utils.js +119 -36
  63. package/build/common/spec-parser/utils.js.map +1 -1
  64. package/build/common/telemetry.d.ts +6 -1
  65. package/build/common/telemetry.d.ts.map +1 -1
  66. package/build/common/telemetry.js +5 -0
  67. package/build/common/telemetry.js.map +1 -1
  68. package/build/common/tools.d.ts.map +1 -1
  69. package/build/common/tools.js +1 -1
  70. package/build/common/tools.js.map +1 -1
  71. package/build/component/configManager/validator.d.ts.map +1 -1
  72. package/build/component/configManager/validator.js +2 -3
  73. package/build/component/configManager/validator.js.map +1 -1
  74. package/build/component/coordinator/index.d.ts +2 -1
  75. package/build/component/coordinator/index.d.ts.map +1 -1
  76. package/build/component/coordinator/index.js +3 -1
  77. package/build/component/coordinator/index.js.map +1 -1
  78. package/build/component/driver/aad/create.js +1 -1
  79. package/build/component/driver/aad/create.js.map +1 -1
  80. package/build/component/driver/aad/error/invalidFieldInManifestError.js +1 -1
  81. package/build/component/driver/aad/error/invalidFieldInManifestError.js.map +1 -1
  82. package/build/component/driver/aad/permissions/index.d.ts +3 -0
  83. package/build/component/driver/aad/permissions/index.d.ts.map +1 -1
  84. package/build/component/driver/aad/permissions/index.js +34 -1
  85. package/build/component/driver/aad/permissions/index.js.map +1 -1
  86. package/build/component/driver/aad/permissions/permissions.json +42 -42
  87. package/build/component/driver/aad/update.d.ts +1 -0
  88. package/build/component/driver/aad/update.d.ts.map +1 -1
  89. package/build/component/driver/aad/update.js +19 -17
  90. package/build/component/driver/aad/update.js.map +1 -1
  91. package/build/component/driver/aad/utility/aadAppClient.js +8 -8
  92. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  93. package/build/component/driver/aad/utility/constants.js +1 -1
  94. package/build/component/driver/aad/utility/constants.js.map +1 -1
  95. package/build/component/driver/apiKey/create.d.ts +17 -0
  96. package/build/component/driver/apiKey/create.d.ts.map +1 -0
  97. package/build/component/driver/apiKey/create.js +226 -0
  98. package/build/component/driver/apiKey/create.js.map +1 -0
  99. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.d.ts +5 -0
  100. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.d.ts.map +1 -0
  101. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js +22 -0
  102. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js.map +1 -0
  103. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.d.ts +5 -0
  104. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.d.ts.map +1 -0
  105. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js +22 -0
  106. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js.map +1 -0
  107. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.d.ts +5 -0
  108. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.d.ts.map +1 -0
  109. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js +21 -0
  110. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js.map +1 -0
  111. package/build/component/driver/apiKey/error/apiKeyNameTooLong.d.ts +5 -0
  112. package/build/component/driver/apiKey/error/apiKeyNameTooLong.d.ts.map +1 -0
  113. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js +21 -0
  114. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js.map +1 -0
  115. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts +7 -0
  116. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts.map +1 -0
  117. package/build/component/driver/apiKey/interface/createApiKeyArgs.js +5 -0
  118. package/build/component/driver/apiKey/interface/createApiKeyArgs.js.map +1 -0
  119. package/build/component/driver/apiKey/interface/createApiKeyOutputs.d.ts +7 -0
  120. package/build/component/driver/apiKey/interface/createApiKeyOutputs.d.ts.map +1 -0
  121. package/build/component/driver/apiKey/interface/createApiKeyOutputs.js +10 -0
  122. package/build/component/driver/apiKey/interface/createApiKeyOutputs.js.map +1 -0
  123. package/build/component/driver/apiKey/utility/constants.d.ts +10 -0
  124. package/build/component/driver/apiKey/utility/constants.d.ts.map +1 -0
  125. package/build/component/driver/apiKey/utility/constants.js +15 -0
  126. package/build/component/driver/apiKey/utility/constants.js.map +1 -0
  127. package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
  128. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +6 -6
  129. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
  130. package/build/component/driver/index.d.ts +1 -0
  131. package/build/component/driver/index.d.ts.map +1 -1
  132. package/build/component/driver/index.js +1 -0
  133. package/build/component/driver/index.js.map +1 -1
  134. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  135. package/build/component/driver/script/scriptDriver.js +2 -2
  136. package/build/component/driver/script/scriptDriver.js.map +1 -1
  137. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +13 -0
  138. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  139. package/build/component/driver/teamsApp/clients/appStudioClient.js +38 -0
  140. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  141. package/build/component/driver/teamsApp/constants.d.ts +2 -0
  142. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  143. package/build/component/driver/teamsApp/constants.js +2 -0
  144. package/build/component/driver/teamsApp/constants.js.map +1 -1
  145. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  146. package/build/component/driver/teamsApp/createAppPackage.js +26 -6
  147. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  148. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts +44 -0
  149. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts.map +1 -0
  150. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js +21 -0
  151. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js.map +1 -0
  152. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.d.ts +15 -0
  153. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.d.ts.map +1 -0
  154. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.js +5 -0
  155. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.js.map +1 -0
  156. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts +1 -1
  157. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts.map +1 -1
  158. package/build/component/driver/teamsApp/teamsappMgr.js +7 -7
  159. package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
  160. package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
  161. package/build/component/driver/teamsApp/validate.js +7 -2
  162. package/build/component/driver/teamsApp/validate.js.map +1 -1
  163. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  164. package/build/component/driver/teamsApp/validateAppPackage.js +35 -7
  165. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  166. package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
  167. package/build/component/generator/copilotPlugin/generator.js +40 -20
  168. package/build/component/generator/copilotPlugin/generator.js.map +1 -1
  169. package/build/component/generator/copilotPlugin/helper.d.ts +1 -2
  170. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
  171. package/build/component/generator/copilotPlugin/helper.js +36 -21
  172. package/build/component/generator/copilotPlugin/helper.js.map +1 -1
  173. package/build/component/generator/error.d.ts +0 -6
  174. package/build/component/generator/error.d.ts.map +1 -1
  175. package/build/component/generator/error.js +1 -13
  176. package/build/component/generator/error.js.map +1 -1
  177. package/build/component/generator/generator.d.ts +5 -1
  178. package/build/component/generator/generator.d.ts.map +1 -1
  179. package/build/component/generator/generator.js +13 -8
  180. package/build/component/generator/generator.js.map +1 -1
  181. package/build/component/generator/generatorAction.d.ts +2 -0
  182. package/build/component/generator/generatorAction.d.ts.map +1 -1
  183. package/build/component/generator/generatorAction.js +6 -6
  184. package/build/component/generator/generatorAction.js.map +1 -1
  185. package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
  186. package/build/component/generator/officeAddin/helperMethods.js +19 -26
  187. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  188. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
  189. package/build/component/generator/spfx/spfxGenerator.js +7 -0
  190. package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
  191. package/build/component/generator/spfx/utils/constants.d.ts +1 -14
  192. package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
  193. package/build/component/generator/spfx/utils/constants.js +1 -14
  194. package/build/component/generator/spfx/utils/constants.js.map +1 -1
  195. package/build/component/generator/utils.d.ts +2 -4
  196. package/build/component/generator/utils.d.ts.map +1 -1
  197. package/build/component/generator/utils.js +4 -14
  198. package/build/component/generator/utils.js.map +1 -1
  199. package/build/component/middleware/questionMW.d.ts +1 -1
  200. package/build/component/middleware/questionMW.d.ts.map +1 -1
  201. package/build/component/middleware/questionMW.js +4 -1
  202. package/build/component/middleware/questionMW.js.map +1 -1
  203. package/build/component/utils/ResourceGroupHelper.d.ts +1 -0
  204. package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
  205. package/build/component/utils/ResourceGroupHelper.js +31 -1
  206. package/build/component/utils/ResourceGroupHelper.js.map +1 -1
  207. package/build/component/utils/envUtil.js +1 -1
  208. package/build/component/utils/envUtil.js.map +1 -1
  209. package/build/component/utils/metadataGraphPermssion.d.ts +16 -0
  210. package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -0
  211. package/build/component/utils/metadataGraphPermssion.js +96 -0
  212. package/build/component/utils/metadataGraphPermssion.js.map +1 -0
  213. package/build/component/utils/metadataUtil.d.ts.map +1 -1
  214. package/build/component/utils/metadataUtil.js +2 -0
  215. package/build/component/utils/metadataUtil.js.map +1 -1
  216. package/build/core/FxCore.d.ts +2 -0
  217. package/build/core/FxCore.d.ts.map +1 -1
  218. package/build/core/FxCore.js +81 -5
  219. package/build/core/FxCore.js.map +1 -1
  220. package/build/core/middleware/projectMigratorV3.js +1 -1
  221. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  222. package/build/core/middleware/utils/debug/taskMigrator.js +1 -1
  223. package/build/error/common.d.ts +9 -0
  224. package/build/error/common.d.ts.map +1 -1
  225. package/build/error/common.js +34 -1
  226. package/build/error/common.js.map +1 -1
  227. package/build/error/teamsApp.d.ts +4 -1
  228. package/build/error/teamsApp.d.ts.map +1 -1
  229. package/build/error/teamsApp.js +13 -1
  230. package/build/error/teamsApp.js.map +1 -1
  231. package/build/index.d.ts +3 -0
  232. package/build/index.d.ts.map +1 -1
  233. package/build/index.js +7 -1
  234. package/build/index.js.map +1 -1
  235. package/build/question/create.d.ts +2 -1
  236. package/build/question/create.d.ts.map +1 -1
  237. package/build/question/create.js +66 -16
  238. package/build/question/create.js.map +1 -1
  239. package/build/question/generator.js +0 -2
  240. package/build/question/generator.js.map +1 -1
  241. package/build/question/index.d.ts +1 -0
  242. package/build/question/index.d.ts.map +1 -1
  243. package/build/question/index.js +3 -0
  244. package/build/question/index.js.map +1 -1
  245. package/build/question/inputs/CreateProjectInputs.d.ts +1 -1
  246. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  247. package/build/question/inputs/DeployAadManifestInputs.d.ts +1 -1
  248. package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -1
  249. package/build/question/inputs/PermissionGrantInputs.d.ts +2 -2
  250. package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -1
  251. package/build/question/inputs/PermissionListInputs.d.ts +1 -1
  252. package/build/question/inputs/PermissionListInputs.d.ts.map +1 -1
  253. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  254. package/build/question/options/CreateProjectOptions.js +2 -1
  255. package/build/question/options/CreateProjectOptions.js.map +1 -1
  256. package/build/question/options/CreateSampleProjectOptions.d.ts.map +1 -1
  257. package/build/question/options/CreateSampleProjectOptions.js +5 -1
  258. package/build/question/options/CreateSampleProjectOptions.js.map +1 -1
  259. package/build/question/options/DeployAadManifestOptions.js +2 -2
  260. package/build/question/options/DeployAadManifestOptions.js.map +1 -1
  261. package/build/question/options/PermissionGrantOptions.js +2 -2
  262. package/build/question/options/PermissionGrantOptions.js.map +1 -1
  263. package/build/question/options/PermissionListOptions.js +2 -2
  264. package/build/question/options/PermissionListOptions.js.map +1 -1
  265. package/build/question/other.d.ts +1 -0
  266. package/build/question/other.d.ts.map +1 -1
  267. package/build/question/other.js +66 -7
  268. package/build/question/other.js.map +1 -1
  269. package/build/question/questionNames.d.ts +1 -0
  270. package/build/question/questionNames.d.ts.map +1 -1
  271. package/build/question/questionNames.js +1 -0
  272. package/build/question/questionNames.js.map +1 -1
  273. package/build/ui/visitor.d.ts.map +1 -1
  274. package/build/ui/visitor.js +1 -2
  275. package/build/ui/visitor.js.map +1 -1
  276. package/package.json +9 -18
  277. package/resource/package.nls.json +65 -44
  278. package/resource/yaml-schema/v1.3/yaml.schema.json +79 -32
  279. package/templates/core/v3Migration/csharp.app.local.yml +6 -6
  280. package/templates/core/v3Migration/csharp.app.yml +6 -6
  281. package/templates/core/v3Migration/js.ts.app.local.yml +11 -11
  282. package/templates/core/v3Migration/js.ts.app.yml +12 -12
  283. package/templates/fallback/common.zip +0 -0
  284. package/templates/fallback/csharp.zip +0 -0
  285. package/templates/fallback/js.zip +0 -0
  286. package/templates/fallback/ts.zip +0 -0
  287. package/templates/plugins/resource/aad/auth/V3/Bot/Pages/BotAuthorizeEndPage.cshtml +55 -51
  288. package/templates/plugins/resource/aad/auth/V3/Enable SSO.txt +2 -2
  289. package/templates/plugins/resource/aad/auth/bot/README.md +13 -13
  290. package/templates/plugins/resource/aad/auth/bot/README.txt +7 -7
  291. package/templates/plugins/resource/aad/auth/bot/csharp/Pages/BotAuthorizeEndPage.cshtml +55 -51
  292. package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +6 -2
  293. package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +5 -1
  294. package/templates/plugins/resource/aad/auth/tab/README.md +6 -6
  295. package/templates/plugins/resource/aad/auth/tab/README.txt +5 -5
  296. package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +16 -9
  297. package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +11 -7
  298. package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +1 -1
  299. package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +16 -9
  300. package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +11 -7
  301. package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +1 -1
@@ -9,11 +9,11 @@ environmentFolderPath: ./ {{~environmentFolder}}
9
9
 
10
10
  provision:
11
11
  {{#if activePlugins.fx-resource-aad-app-for-teams}}
12
- - uses: aadApp/create # Creates a new Azure Active Directory (AAD) app to authenticate users if the environment variable that stores clientId is empty
12
+ - uses: aadApp/create # Creates a new Microsoft Entra app to authenticate users if the environment variable that stores clientId is empty
13
13
  with:
14
- name: {{aadAppName}} # Note: when you run aadApp/update, the AAD app name will be updated based on the definition in manifest. If you don't want to change the name, make sure the name in AAD manifest is the same with the name defined here.
14
+ name: {{aadAppName}} # Note: when you run aadApp/update, the Microsoft Entra app name will be updated based on the definition in manifest. If you don't want to change the name, make sure the name in Microsoft Entra manifest is the same with the name defined here.
15
15
  generateClientSecret: true # If the value is false, the action will not generate client secret for you
16
- signInAudience: "AzureADMyOrg" # Authenticate users with a Microsoft work or school account in your organization's Azure AD tenant (for example, single tenant).
16
+ signInAudience: "AzureADMyOrg" # Authenticate users with a Microsoft work or school account in your organization's Microsoft Entra tenant (for example, single tenant).
17
17
  writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s).
18
18
  clientId: AAD_APP_CLIENT_ID
19
19
  clientSecret: SECRET_AAD_APP_CLIENT_SECRET # Environment variable that starts with `SECRET_` will be stored to the .env.{envName}.user environment file
@@ -29,7 +29,7 @@ provision:
29
29
  # Write the information of created resources into environment file for the specified environment variable(s).
30
30
  teamsAppId: TEAMS_APP_ID
31
31
  {{#if activePlugins.fx-resource-bot}}
32
- - uses: botAadApp/create # Creates a new AAD app for Bot Registration.
32
+ - uses: botAadApp/create # Creates a new Microsoft Entra app for Bot Registration.
33
33
  with:
34
34
  name: {{appName}}bt$\{{RESOURCE_SUFFIX}}
35
35
  writeToEnvironmentFile:
@@ -51,9 +51,9 @@ provision:
51
51
  run: echo "::set-teamsfx-env {{placeholderMappings.[state.fx-resource-frontend-hosting.indexPath]}}=/" # Used in appPackage/manifest.json file.
52
52
  {{/if}}
53
53
  {{#if activePlugins.fx-resource-aad-app-for-teams}}
54
- - uses: aadApp/update # Apply the AAD manifest to an existing AAD app. Will use the object id in manifest file to determine which AAD app to update.
54
+ - uses: aadApp/update # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in manifest file to determine which Microsoft Entra app to update.
55
55
  with:
56
- manifestPath: ./aad.manifest.json # Relative path to this file. Environment variables in manifest will be replaced before apply to AAD app
56
+ manifestPath: ./aad.manifest.json # Relative path to this file. Environment variables in manifest will be replaced before apply to Microsoft Entra app
57
57
  outputFilePath : ./build/aad.manifest.$\{{TEAMSFX_ENV}}.json
58
58
  {{/if}}
59
59
  - uses: teamsApp/validateManifest # Validate using manifest schema
@@ -7,19 +7,19 @@ version: 1.0.0
7
7
  provision:
8
8
  {{#registerApp}}
9
9
  {{#if aad}}
10
- # Creates a new Azure Active Directory (AAD) app to authenticate users if
10
+ # Creates a new Microsoft Entra app to authenticate users if
11
11
  # the environment variable that stores clientId is empty
12
12
  - uses: aadApp/create
13
13
  with:
14
- # Note: when you run aadApp/update, the AAD app name will be updated
14
+ # Note: when you run aadApp/update, the Microsoft Entra app name will be updated
15
15
  # based on the definition in manifest. If you don't want to change the
16
- # name, make sure the name in AAD manifest is the same with the name
16
+ # name, make sure the name in Microsoft Entra manifest is the same with the name
17
17
  # defined here.
18
18
  name: $\{{CONFIG__MANIFEST__APPNAME__SHORT}}-aad
19
19
  # If the value is false, the action will not generate client secret for you
20
20
  generateClientSecret: true
21
21
  # Authenticate users with a Microsoft work or school account in your
22
- # organization's Azure AD tenant (for example, single tenant).
22
+ # organization's Microsoft Entra tenant (for example, single tenant).
23
23
  signInAudience: "AzureADMyOrg"
24
24
  # Write the information of created resources into environment file for the
25
25
  # specified environment variable(s).
@@ -48,15 +48,15 @@ provision:
48
48
 
49
49
  {{/registerApp}}
50
50
  {{#bot}}
51
- # Create or reuse an existing Azure Active Directory application for bot.
51
+ # Create or reuse an existing Microsoft Entra application for bot.
52
52
  - uses: botAadApp/create
53
53
  with:
54
- # The Azure Active Directory application's display name
54
+ # The Microsoft Entra application's display name
55
55
  name: $\{{CONFIG__MANIFEST__APPNAME__SHORT}}-bot
56
56
  writeToEnvironmentFile:
57
- # The Azure Active Directory application's client id created for bot.
57
+ # The Microsoft Entra application's client id created for bot.
58
58
  botId: BOT_ID
59
- # The Azure Active Directory application's client secret created for bot.
59
+ # The Microsoft Entra application's client secret created for bot.
60
60
  botPassword: SECRET_BOT_PASSWORD
61
61
 
62
62
  # Create or update the bot registration on dev.botframework.com
@@ -84,12 +84,12 @@ provision:
84
84
 
85
85
  {{/tab}}
86
86
  {{#if aad}}
87
- # Apply the AAD manifest to an existing AAD app. Will use the object id in
88
- # manifest file to determine which AAD app to update.
87
+ # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in
88
+ # manifest file to determine which Microsoft Entra app to update.
89
89
  - uses: aadApp/update
90
90
  with:
91
91
  # Relative path to this file. Environment variables in manifest will
92
- # be replaced before apply to AAD app
92
+ # be replaced before apply to Microsoft Entra app
93
93
  manifestPath: ./aad.manifest.json
94
94
  outputFilePath : ./build/aad.manifest.$\{{TEAMSFX_ENV}}.json
95
95
 
@@ -10,19 +10,19 @@ environmentFolderPath: ./ {{~environmentFolder}}
10
10
  # Triggered when 'teamsfx provision' is executed
11
11
  provision:
12
12
  {{#if activePlugins.fx-resource-aad-app-for-teams}}
13
- # Creates a new Azure Active Directory (AAD) app to authenticate users if
13
+ # Creates a new Microsoft Entra app to authenticate users if
14
14
  # the environment variable that stores clientId is empty
15
15
  - uses: aadApp/create
16
16
  with:
17
- # Note: when you run aadApp/update, the AAD app name will be updated
17
+ # Note: when you run aadApp/update, the Microsoft Entra app name will be updated
18
18
  # based on the definition in manifest. If you don't want to change the
19
- # name, make sure the name in AAD manifest is the same with the name
19
+ # name, make sure the name in Microsoft Entra manifest is the same with the name
20
20
  # defined here.
21
21
  name: {{aadAppName}}
22
22
  # If the value is false, the action will not generate client secret for you
23
23
  generateClientSecret: true
24
24
  # Authenticate users with a Microsoft work or school account in your
25
- # organization's Azure AD tenant (for example, single tenant).
25
+ # organization's Microsoft Entra tenant (for example, single tenant).
26
26
  signInAudience: "AzureADMyOrg"
27
27
  # Write the information of created resources into environment file for the
28
28
  # specified environment variable(s).
@@ -46,15 +46,15 @@ provision:
46
46
  writeToEnvironmentFile:
47
47
  teamsAppId: TEAMS_APP_ID
48
48
  {{#if activePlugins.fx-resource-bot}}
49
- # Create or reuse an existing Azure Active Directory application for bot.
49
+ # Create or reuse an existing Microsoft Entra application for bot.
50
50
  - uses: botAadApp/create
51
51
  with:
52
- # The Azure Active Directory application's display name
52
+ # The Microsoft Entra application's display name
53
53
  name: {{appName}}bt$\{{RESOURCE_SUFFIX}}
54
54
  writeToEnvironmentFile:
55
- # The Azure Active Directory application's client id created for bot.
55
+ # The Microsoft Entra application's client id created for bot.
56
56
  botId: BOT_ID
57
- # The Azure Active Directory application's client secret created for bot.
57
+ # The Microsoft Entra application's client secret created for bot.
58
58
  botPassword: SECRET_BOT_PASSWORD
59
59
  {{/if}}
60
60
  - uses: arm/deploy # Deploy given ARM templates parallelly.
@@ -89,12 +89,12 @@ provision:
89
89
  errorPage: error.html
90
90
  {{/if}}
91
91
  {{#if activePlugins.fx-resource-aad-app-for-teams}}
92
- # Apply the AAD manifest to an existing AAD app. Will use the object id in
93
- # manifest file to determine which AAD app to update.
92
+ # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in
93
+ # manifest file to determine which Microsoft Entra app to update.
94
94
  - uses: aadApp/update
95
95
  with:
96
96
  # Relative path to this file. Environment variables in manifest will
97
- # be replaced before apply to AAD app
97
+ # be replaced before apply to Microsoft Entra app
98
98
  manifestPath: ./aad.manifest.json
99
99
  outputFilePath : ./build/aad.manifest.$\{{TEAMSFX_ENV}}.json
100
100
  {{/if}}
@@ -163,7 +163,7 @@ deploy:
163
163
  - uses: azureStorage/deploy
164
164
  with:
165
165
  workingDirectory: tabs
166
- # Deploy base folder. This folder includes manifest files for AAD app and Teams app that should be ignored using the ignoreFile.
166
+ # Deploy base folder. This folder includes manifest files for Microsoft Entra app and Teams app that should be ignored using the ignoreFile.
167
167
  artifactFolder: build
168
168
  # The resource id of the cloud resource to be deployed to.
169
169
  # This key will be generated by arm/deploy action automatically.
Binary file
Binary file
Binary file
Binary file
@@ -1,61 +1,65 @@
1
1
  @page "/bot-auth-end.html"
2
2
 
3
3
  <html>
4
+
4
5
  <head>
5
- <title>Login End Page</title>
6
- <meta charset="utf-8" />
6
+ <title>Login End Page</title>
7
+ <meta charset="utf-8" />
7
8
  </head>
8
9
 
9
10
  <body>
10
- <script src="https://res.cdn.office.net/teams-js/2.7.1/js/MicrosoftTeams.min.js" integrity="sha384-4Gy2G+qxzDVdrdemcVqKVQvaSK1Ghg3x6xcsaMLPc/pw7KPtiogHGM97LTWF2PWg" crossorigin="anonymous"></script>
11
- <div id="divError"></div>
12
- <script type="text/javascript">
13
- microsoftTeams.app.initialize().then(()=>{
14
- let hashParams = getHashParameters();
15
- if (hashParams["error"]) {
16
- // Authentication failed
17
- handleAuthError(hashParams["error"], hashParams);
18
- } else if (hashParams["code"]) {
19
- // Get the stored state parameter and compare with incoming state
20
- let expectedState = localStorage.getItem("state");
21
- if (expectedState !== hashParams["state"]) {
22
- // State does not match, report error
23
- handleAuthError("StateDoesNotMatch", hashParams);
24
- } else {
25
- microsoftTeams.authentication.notifySuccess();
26
- }
27
- } else {
28
- // Unexpected condition: hash does not contain error or access_token parameter
29
- handleAuthError("UnexpectedFailure", hashParams);
30
- }
31
- });
32
-
33
- // Parse hash parameters into key-value pairs
34
- function getHashParameters() {
35
- let hashParams = {};
36
- location.hash
37
- .substr(1)
38
- .split("&")
39
- .forEach(function (item) {
40
- let s = item.split("="),
41
- k = s[0],
42
- v = s[1] && decodeURIComponent(s[1]);
43
- hashParams[k] = v;
44
- });
45
- return hashParams;
46
- }
47
- // Show error information
48
- function handleAuthError(errorType, errorMessage) {
49
- const err = JSON.stringify({
50
- error: errorType,
51
- message: JSON.stringify(errorMessage),
52
- });
53
- let para = document.createElement("p");
54
- let node = document.createTextNode(err);
55
- para.appendChild(node);
56
- let element = document.getElementById("divError");
57
- element.appendChild(para);
11
+ <script src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
12
+ integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
13
+ crossorigin="anonymous"></script>
14
+ <div id="divError"></div>
15
+ <script type="text/javascript">
16
+ microsoftTeams.app.initialize().then(() => {
17
+ let hashParams = getHashParameters();
18
+ if (hashParams["error"]) {
19
+ // Authentication failed
20
+ handleAuthError(hashParams["error"], hashParams);
21
+ } else if (hashParams["code"]) {
22
+ // Get the stored state parameter and compare with incoming state
23
+ let expectedState = localStorage.getItem("state");
24
+ if (expectedState !== hashParams["state"]) {
25
+ // State does not match, report error
26
+ handleAuthError("StateDoesNotMatch", hashParams);
27
+ } else {
28
+ microsoftTeams.authentication.notifySuccess();
58
29
  }
59
- </script>
30
+ } else {
31
+ // Unexpected condition: hash does not contain error or access_token parameter
32
+ handleAuthError("UnexpectedFailure", hashParams);
33
+ }
34
+ });
35
+
36
+ // Parse hash parameters into key-value pairs
37
+ function getHashParameters() {
38
+ let hashParams = {};
39
+ location.hash
40
+ .substr(1)
41
+ .split("&")
42
+ .forEach(function (item) {
43
+ let s = item.split("="),
44
+ k = s[0],
45
+ v = s[1] && decodeURIComponent(s[1]);
46
+ hashParams[k] = v;
47
+ });
48
+ return hashParams;
49
+ }
50
+ // Show error information
51
+ function handleAuthError(errorType, errorMessage) {
52
+ const err = JSON.stringify({
53
+ error: errorType,
54
+ message: JSON.stringify(errorMessage),
55
+ });
56
+ let para = document.createElement("p");
57
+ let node = document.createTextNode(err);
58
+ para.appendChild(node);
59
+ let element = document.getElementById("divError");
60
+ element.appendChild(para);
61
+ }
62
+ </script>
60
63
  </body>
64
+
61
65
  </html>
@@ -1,13 +1,13 @@
1
1
  Enable Single Sign-on for Teams Applications
2
2
  -------------------------
3
3
 
4
- On click of Visual Studio menu Project -> Teams Toolkit -> Add Authentication Code, couple of files for Single Sign-on are generated in "TeamsFx-Auth" folder, including a manifest template file for Azure AD application and authentication redirect pages.
4
+ On click of Visual Studio menu Project -> Teams Toolkit -> Add Authentication Code, couple of files for Single Sign-on are generated in "TeamsFx-Auth" folder, including a manifest template file for Microsoft Entra application and authentication redirect pages.
5
5
 
6
6
  Teams Toolkit helps you generate the authentication files, then you will need to link the files to your Teams application by updating authentication configurations to make sure the Single Sign-on works for your application. Please be noted that for different Teams application type like Tab or Bot, the detailed steps are slightly different.
7
7
 
8
8
  Basically you will need take care these configurations:
9
9
 
10
- * In the Azure AD manifest file, you need to specify URIs such as the URI to identify the Azure AD authentication app and the redirect URI for returning token.
10
+ * In the Microsoft Entra manifest file, you need to specify URIs such as the URI to identify the Microsoft Entra authentication app and the redirect URI for returning token.
11
11
  * In the Teams manifest file, add the SSO application to link it with Teams application.
12
12
  * Add SSO application information in Teams Toolkit configuration files in order to make sure the authentication app can be registered on backend service and started by Teams Toolkit when you debugging or previewing Teams application.
13
13
 
@@ -2,20 +2,20 @@
2
2
 
3
3
  > Note: This document includes single sign-on instructions applicable for both bot and message extension. Make sure to add the corresponding Teams capability first and then follow the documentation.
4
4
 
5
- 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 (AAD) flows and integrations behind some simple, high level APIs. This enables you to add single sign-on (SSO) features easily to your Teams application.
5
+ 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 Microsoft Entra ID flows and integrations behind some simple, high level APIs. This enables you to add single sign-on (SSO) features easily to your Teams application.
6
6
 
7
- For a bot application, user can invoke the AAD consent flow to obtain sso token to call Graph and other APIs.
7
+ For a bot application, user can invoke the Microsoft Entra consent flow to obtain sso token to call Graph and other APIs.
8
8
 
9
9
  <h2>Contents </h2>
10
10
 
11
11
  - [Changes to your project](#1)
12
12
  - [Update code to Use SSO for Bot](#2)
13
- - [Set up the AAD redirects](#2.1)
13
+ - [Set up the Microsoft Entra redirects](#2.1)
14
14
  - [Update your business logic](#2.2)
15
15
  - [(Optional) Add a new sso command to the bot](#2.3)
16
16
  - [Update code to Use SSO for Message Extension](#3)
17
17
  - [Debug your application](#4)
18
- - [Customize AAD applications](#5)
18
+ - [Customize Microsoft Entra applications](#5)
19
19
  - [Trouble Shooting](#6)
20
20
 
21
21
  <h2 id='1'>Changes to your project</h2>
@@ -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 Azure Active Directory application manifest that is used to register the application with AAD. |
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>
@@ -38,9 +38,9 @@ As described above, the Teams Toolkit generated some configuration to set up you
38
38
 
39
39
  > Note: The following part is for `command and response bot`. For `basic bot`, please refer to the [bot-sso sample](https://aka.ms/bot-sso-sample).
40
40
 
41
- <h3 id='2.1'>Set up the AAD redirects</h3>
41
+ <h3 id='2.1'>Set up the Microsoft Entra redirects</h3>
42
42
 
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 AAD, AAD will redirect the user to these pages.
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
44
  1. Modify your `bot/src/index` to add the appropriate `restify` routes to these pages.
45
45
 
46
46
  ```ts
@@ -56,7 +56,7 @@ As described above, the Teams Toolkit generated some configuration to set up you
56
56
 
57
57
  <h3 id='2.2'>Update your business logic</h3>
58
58
 
59
- The sample business logic provides a sso command handler `ProfileSsoCommandHandler` that use an AAD token to call Microsoft Graph. This token is obtained by using the logged-in Teams user token. The flow is brought together in a dialog that will display a consent dialog if required.
59
+ The sample business logic provides a sso command handler `ProfileSsoCommandHandler` that use a Microsoft Entra token to call Microsoft Graph. This token is obtained by using the logged-in Teams user token. The flow is brought together in a dialog that will display a consent dialog if required.
60
60
 
61
61
  To make this work in your application:
62
62
 
@@ -336,7 +336,7 @@ You can update the query logic in the `handleMessageExtensionQueryWithSSO` with
336
336
 
337
337
  To make this work in your application:
338
338
 
339
- 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 AAD, AAD will redirect the user to these pages.
339
+ 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
340
  1. Modify your `bot/index` to add the appropriate `restify` routes to these pages.
341
341
 
342
342
  ```ts
@@ -394,17 +394,17 @@ To make this work in your application:
394
394
 
395
395
  You can debug your application by pressing F5.
396
396
 
397
- Teams Toolkit will use the AAD manifest file to register a AAD application registered for SSO.
397
+ Teams Toolkit will use the Microsoft Entra manifest file to register a Microsoft Entra application registered for SSO.
398
398
 
399
399
  To learn more about Teams Toolkit local debug functionalities, refer to this [document](https://docs.microsoft.com/microsoftteams/platform/toolkit/debug-local).
400
400
 
401
- <h2 id='5'>Customize AAD applications</h2>
401
+ <h2 id='5'>Customize Microsoft Entra applications</h2>
402
402
 
403
- 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.
403
+ The Microsoft Entra [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.
404
404
 
405
405
  Follow this [document](https://aka.ms/teamsfx-aad-manifest#customize-aad-manifest-template) if you need to include additional API permissions to access your desired APIs.
406
406
 
407
- 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.
407
+ Follow this [document](https://aka.ms/teamsfx-aad-manifest#How-to-view-the-AAD-app-on-the-Azure-portal) to view your Microsoft Entra application in Azure Portal.
408
408
 
409
409
  <h2 id='6'>Trouble Shooting </h2>
410
410
 
@@ -1,13 +1,13 @@
1
1
  Enable single sign-on for Teams bot applications
2
2
  -------------------------
3
3
 
4
- For Teams bot application, SSO manifests as an Adaptive Card which the user can interact with to invoke the AAD consent flow.
4
+ For Teams bot application, SSO manifests as an Adaptive Card which the user can interact with to invoke the Microsoft Entra consent flow.
5
5
 
6
6
  Files generated/updated in your project
7
7
  -------------------------
8
8
 
9
9
  1. New file - `aad.template.json` is created in folder `templates/appPackage`
10
- - The Azure Active Directory application manifest that is used to register the application with AAD.
10
+ - The Azure Active Directory application manifest that is used to register the application with Microsoft Entra.
11
11
  2. Update file - 'templates/appPackage/manifest.template.json'
12
12
  - An `webApplicationInfo` object will be added into your Teams app manifest template. This field is required by Teams when enabling SSO. |
13
13
  3. New file - `Auth/bot`
@@ -24,7 +24,7 @@ Note: This part is for `command and response bot`.
24
24
  Microsoft.Bot.Builder >= 4.17.1
25
25
 
26
26
  2. Create "Pages" folder and move files in `Auth/bot/Pages` folder to `Pages`
27
- `Auth/bot/Pages` folder contains HTML pages that hosted by bot application. When single sign-on flows are initiated with AAD, AAD will redirect the user to these pages.
27
+ `Auth/bot/Pages` folder contains HTML pages that hosted by bot application. When single sign-on flows are initiated with Microsoft Entra ID, Microsoft Entra ID will redirect the user to these pages.
28
28
 
29
29
  3. Create "SSO" folder and move files in 'Auth/bot/SSO' folder to 'SSO'
30
30
  This folder contains two files as reference for SSO implementation:
@@ -174,15 +174,15 @@ to install the app to
174
174
  3. Press F5, or select the Debug > Start Debugging menu in Visual Studio
175
175
  4. In the launched browser, select the Add button to load the app in Teams
176
176
 
177
- Teams Toolkit will use the AAD manifest file to register a AAD application registered for SSO.
177
+ Teams Toolkit will use the Microsoft Entra manifest file to register a Microsoft Entra application registered for SSO.
178
178
 
179
179
  To learn more about Teams Toolkit local debug functionalities, refer to https://docs.microsoft.com/microsoftteams/platform/toolkit/debug-local.
180
180
 
181
- Customize AAD applications
181
+ Customize Microsoft Entra applications
182
182
  -------------------------
183
- The AAD manifest allows you to customize various aspects of your application registration. You can update the manifest as needed.
183
+ The Microsoft Entra manifest allows you to customize various aspects of your application registration. You can update the manifest as needed.
184
184
  Related Doc: https://docs.microsoft.com/azure/active-directory/develop/reference-app-manifest
185
185
 
186
186
  Follow 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.
187
187
 
188
- Follow https://aka.ms/teamsfx-aad-manifest#How-to-view-the-AAD-app-on-the-Azure-portal to view your AAD application in Azure Portal.
188
+ Follow https://aka.ms/teamsfx-aad-manifest#How-to-view-the-AAD-app-on-the-Azure-portal to view your Microsoft Entra application in Azure Portal.
@@ -1,61 +1,65 @@
1
1
  @page "/bot-auth-end.html"
2
2
 
3
3
  <html>
4
+
4
5
  <head>
5
- <title>Login End Page</title>
6
- <meta charset="utf-8" />
6
+ <title>Login End Page</title>
7
+ <meta charset="utf-8" />
7
8
  </head>
8
9
 
9
10
  <body>
10
- <script src="https://res.cdn.office.net/teams-js/2.7.1/js/MicrosoftTeams.min.js" integrity="sha384-4Gy2G+qxzDVdrdemcVqKVQvaSK1Ghg3x6xcsaMLPc/pw7KPtiogHGM97LTWF2PWg" crossorigin="anonymous"></script>
11
- <div id="divError"></div>
12
- <script type="text/javascript">
13
- microsoftTeams.app.initialize().then(()=>{
14
- let hashParams = getHashParameters();
15
- if (hashParams["error"]) {
16
- // Authentication failed
17
- handleAuthError(hashParams["error"], hashParams);
18
- } else if (hashParams["code"]) {
19
- // Get the stored state parameter and compare with incoming state
20
- let expectedState = localStorage.getItem("state");
21
- if (expectedState !== hashParams["state"]) {
22
- // State does not match, report error
23
- handleAuthError("StateDoesNotMatch", hashParams);
24
- } else {
25
- microsoftTeams.authentication.notifySuccess();
26
- }
27
- } else {
28
- // Unexpected condition: hash does not contain error or access_token parameter
29
- handleAuthError("UnexpectedFailure", hashParams);
30
- }
31
- });
32
-
33
- // Parse hash parameters into key-value pairs
34
- function getHashParameters() {
35
- let hashParams = {};
36
- location.hash
37
- .substr(1)
38
- .split("&")
39
- .forEach(function (item) {
40
- let s = item.split("="),
41
- k = s[0],
42
- v = s[1] && decodeURIComponent(s[1]);
43
- hashParams[k] = v;
44
- });
45
- return hashParams;
46
- }
47
- // Show error information
48
- function handleAuthError(errorType, errorMessage) {
49
- const err = JSON.stringify({
50
- error: errorType,
51
- message: JSON.stringify(errorMessage),
52
- });
53
- let para = document.createElement("p");
54
- let node = document.createTextNode(err);
55
- para.appendChild(node);
56
- let element = document.getElementById("divError");
57
- element.appendChild(para);
11
+ <script src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
12
+ integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
13
+ crossorigin="anonymous"></script>
14
+ <div id="divError"></div>
15
+ <script type="text/javascript">
16
+ microsoftTeams.app.initialize().then(() => {
17
+ let hashParams = getHashParameters();
18
+ if (hashParams["error"]) {
19
+ // Authentication failed
20
+ handleAuthError(hashParams["error"], hashParams);
21
+ } else if (hashParams["code"]) {
22
+ // Get the stored state parameter and compare with incoming state
23
+ let expectedState = localStorage.getItem("state");
24
+ if (expectedState !== hashParams["state"]) {
25
+ // State does not match, report error
26
+ handleAuthError("StateDoesNotMatch", hashParams);
27
+ } else {
28
+ microsoftTeams.authentication.notifySuccess();
58
29
  }
59
- </script>
30
+ } else {
31
+ // Unexpected condition: hash does not contain error or access_token parameter
32
+ handleAuthError("UnexpectedFailure", hashParams);
33
+ }
34
+ });
35
+
36
+ // Parse hash parameters into key-value pairs
37
+ function getHashParameters() {
38
+ let hashParams = {};
39
+ location.hash
40
+ .substr(1)
41
+ .split("&")
42
+ .forEach(function (item) {
43
+ let s = item.split("="),
44
+ k = s[0],
45
+ v = s[1] && decodeURIComponent(s[1]);
46
+ hashParams[k] = v;
47
+ });
48
+ return hashParams;
49
+ }
50
+ // Show error information
51
+ function handleAuthError(errorType, errorMessage) {
52
+ const err = JSON.stringify({
53
+ error: errorType,
54
+ message: JSON.stringify(errorMessage),
55
+ });
56
+ let para = document.createElement("p");
57
+ let node = document.createTextNode(err);
58
+ para.appendChild(node);
59
+ let element = document.getElementById("divError");
60
+ element.appendChild(para);
61
+ }
62
+ </script>
60
63
  </body>
64
+
61
65
  </html>
@@ -8,7 +8,11 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
- <script src="https://res.cdn.office.net/teams-js/2.7.1/js/MicrosoftTeams.min.js" integrity="sha384-4Gy2G+qxzDVdrdemcVqKVQvaSK1Ghg3x6xcsaMLPc/pw7KPtiogHGM97LTWF2PWg" crossorigin="anonymous"></script>
11
+ <script
12
+ src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
13
+ integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
14
+ crossorigin="anonymous"
15
+ ></script>
12
16
  <div id="divError"></div>
13
17
  <script type="text/javascript">
14
18
  microsoftTeams.app.initialize().then(() => {
@@ -31,7 +35,7 @@
31
35
  handleAuthError("UnexpectedFailure", hashParams);
32
36
  }
33
37
  });
34
-
38
+
35
39
  // Parse hash parameters into key-value pairs
36
40
  function getHashParameters() {
37
41
  let hashParams = new Map();
@@ -8,7 +8,11 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
- <script src="https://res.cdn.office.net/teams-js/2.7.1/js/MicrosoftTeams.min.js" integrity="sha384-4Gy2G+qxzDVdrdemcVqKVQvaSK1Ghg3x6xcsaMLPc/pw7KPtiogHGM97LTWF2PWg" crossorigin="anonymous"></script>
11
+ <script
12
+ src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
13
+ integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
14
+ crossorigin="anonymous"
15
+ ></script>
12
16
  <div id="divError"></div>
13
17
  <script type="text/javascript">
14
18
  microsoftTeams.app.initialize().then(() => {