@microsoft/teamsfx-core 2.0.0-alpha.2a6e2f57a.0 → 2.0.0-alpha.34e31d6eb.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 (159) hide show
  1. package/build/common/deps-checker/constant/helpLink.d.ts +6 -6
  2. package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -1
  3. package/build/common/deps-checker/constant/helpLink.js +14 -8
  4. package/build/common/deps-checker/constant/helpLink.js.map +1 -1
  5. package/build/common/deps-checker/constant/message.d.ts +4 -2
  6. package/build/common/deps-checker/constant/message.d.ts.map +1 -1
  7. package/build/common/deps-checker/constant/message.js +11 -5
  8. package/build/common/deps-checker/constant/message.js.map +1 -1
  9. package/build/common/deps-checker/constant/telemetry.d.ts +12 -1
  10. package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
  11. package/build/common/deps-checker/constant/telemetry.js +11 -0
  12. package/build/common/deps-checker/constant/telemetry.js.map +1 -1
  13. package/build/common/deps-checker/depsChecker.d.ts +3 -0
  14. package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
  15. package/build/common/deps-checker/depsChecker.js.map +1 -1
  16. package/build/common/deps-checker/internal/funcToolChecker.d.ts +3 -4
  17. package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
  18. package/build/common/deps-checker/internal/funcToolChecker.js +108 -64
  19. package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
  20. package/build/common/deps-checker/internal/nodeChecker.d.ts +3 -3
  21. package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
  22. package/build/common/deps-checker/internal/nodeChecker.js +1 -1
  23. package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
  24. package/build/common/deps-checker/util/fileHelper.js +1 -1
  25. package/build/common/deps-checker/util/fileHelper.js.map +1 -1
  26. package/build/common/versionMetadata.d.ts +1 -0
  27. package/build/common/versionMetadata.d.ts.map +1 -1
  28. package/build/common/versionMetadata.js +1 -0
  29. package/build/common/versionMetadata.js.map +1 -1
  30. package/build/component/configManager/diagnostic.d.ts +9 -0
  31. package/build/component/configManager/diagnostic.d.ts.map +1 -0
  32. package/build/component/configManager/diagnostic.js +47 -0
  33. package/build/component/configManager/diagnostic.js.map +1 -0
  34. package/build/component/configManager/parser.d.ts.map +1 -1
  35. package/build/component/configManager/parser.js +10 -4
  36. package/build/component/configManager/parser.js.map +1 -1
  37. package/build/component/constants.d.ts +4 -0
  38. package/build/component/constants.d.ts.map +1 -1
  39. package/build/component/constants.js +49 -26
  40. package/build/component/constants.js.map +1 -1
  41. package/build/component/coordinator/index.d.ts +2 -2
  42. package/build/component/coordinator/index.d.ts.map +1 -1
  43. package/build/component/coordinator/index.js +50 -61
  44. package/build/component/coordinator/index.js.map +1 -1
  45. package/build/component/developerPortalScaffoldUtils.d.ts +4 -1
  46. package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
  47. package/build/component/developerPortalScaffoldUtils.js +5 -5
  48. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  49. package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
  50. package/build/component/driver/arm/deployImpl.js +4 -1
  51. package/build/component/driver/arm/deployImpl.js.map +1 -1
  52. package/build/component/driver/arm/validator.d.ts.map +1 -1
  53. package/build/component/driver/arm/validator.js +0 -15
  54. package/build/component/driver/arm/validator.js.map +1 -1
  55. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +3 -3
  56. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
  57. package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
  58. package/build/component/driver/devTool/installDriver.js +18 -7
  59. package/build/component/driver/devTool/installDriver.js.map +1 -1
  60. package/build/component/driver/teamsApp/interfaces/ValidateManifestArgs.d.ts +5 -0
  61. package/build/component/driver/teamsApp/interfaces/ValidateManifestArgs.d.ts.map +1 -1
  62. package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
  63. package/build/component/driver/teamsApp/validate.js +29 -9
  64. package/build/component/driver/teamsApp/validate.js.map +1 -1
  65. package/build/component/feature/apiconnector/errors.d.ts +0 -4
  66. package/build/component/feature/apiconnector/errors.d.ts.map +1 -1
  67. package/build/component/feature/apiconnector/errors.js +12 -16
  68. package/build/component/feature/apiconnector/errors.js.map +1 -1
  69. package/build/component/feature/bot/bot.js +8 -8
  70. package/build/component/feature/bot/bot.js.map +1 -1
  71. package/build/component/feature/bot/question.d.ts +6 -6
  72. package/build/component/feature/bot/question.d.ts.map +1 -1
  73. package/build/component/feature/bot/question.js +69 -38
  74. package/build/component/feature/bot/question.js.map +1 -1
  75. package/build/component/generator/generator.d.ts +1 -1
  76. package/build/component/generator/generator.d.ts.map +1 -1
  77. package/build/component/generator/generator.js +2 -2
  78. package/build/component/generator/generator.js.map +1 -1
  79. package/build/component/generator/officeAddin/question.d.ts.map +1 -1
  80. package/build/component/generator/officeAddin/question.js +3 -3
  81. package/build/component/generator/officeAddin/question.js.map +1 -1
  82. package/build/component/resource/appManifest/utils/ManifestUtils.d.ts +1 -0
  83. package/build/component/resource/appManifest/utils/ManifestUtils.d.ts.map +1 -1
  84. package/build/component/resource/appManifest/utils/ManifestUtils.js +4 -1
  85. package/build/component/resource/appManifest/utils/ManifestUtils.js.map +1 -1
  86. package/build/component/resource/appManifest/utils/utils.d.ts.map +1 -1
  87. package/build/component/resource/appManifest/utils/utils.js +5 -1
  88. package/build/component/resource/appManifest/utils/utils.js.map +1 -1
  89. package/build/component/resource/azureSql/errors.js +28 -28
  90. package/build/component/resource/azureSql/errors.js.map +1 -1
  91. package/build/component/resource/azureStorage/configs.d.ts +1 -1
  92. package/build/component/utils/depsChecker/bicepChecker.d.ts.map +1 -1
  93. package/build/component/utils/depsChecker/bicepChecker.js +4 -7
  94. package/build/component/utils/depsChecker/bicepChecker.js.map +1 -1
  95. package/build/core/FxCoreImplementV3.d.ts +1 -0
  96. package/build/core/FxCoreImplementV3.d.ts.map +1 -1
  97. package/build/core/FxCoreImplementV3.js +20 -7
  98. package/build/core/FxCoreImplementV3.js.map +1 -1
  99. package/build/core/environment.d.ts.map +1 -1
  100. package/build/core/environment.js +2 -13
  101. package/build/core/environment.js.map +1 -1
  102. package/build/core/middleware/projectMigratorV3.d.ts +1 -1
  103. package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
  104. package/build/core/middleware/projectMigratorV3.js +36 -24
  105. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  106. package/build/core/middleware/questionModel.d.ts.map +1 -1
  107. package/build/core/middleware/questionModel.js +100 -17
  108. package/build/core/middleware/questionModel.js.map +1 -1
  109. package/build/core/middleware/utils/MigrationUtils.d.ts.map +1 -1
  110. package/build/core/middleware/utils/MigrationUtils.js +1 -0
  111. package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
  112. package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts.map +1 -1
  113. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +3 -1
  114. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
  115. package/build/core/middleware/utils/debug/taskMigrator.d.ts +1 -0
  116. package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
  117. package/build/core/middleware/utils/debug/taskMigrator.js +37 -1
  118. package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
  119. package/build/core/middleware/utils/migrationContext.d.ts +1 -0
  120. package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
  121. package/build/core/middleware/utils/migrationContext.js +1 -0
  122. package/build/core/middleware/utils/migrationContext.js.map +1 -1
  123. package/build/core/middleware/utils/v3MigrationUtils.d.ts +8 -1
  124. package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
  125. package/build/core/middleware/utils/v3MigrationUtils.js +28 -3
  126. package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
  127. package/build/core/question.d.ts +7 -1
  128. package/build/core/question.d.ts.map +1 -1
  129. package/build/core/question.js +178 -88
  130. package/build/core/question.js.map +1 -1
  131. package/build/error/arm.d.ts +6 -0
  132. package/build/error/arm.d.ts.map +1 -1
  133. package/build/error/arm.js +17 -1
  134. package/build/error/arm.js.map +1 -1
  135. package/build/error/common.d.ts +3 -0
  136. package/build/error/common.d.ts.map +1 -1
  137. package/build/error/common.js +14 -1
  138. package/build/error/common.js.map +1 -1
  139. package/build/error/deploy.d.ts +1 -1
  140. package/build/error/deploy.d.ts.map +1 -1
  141. package/build/error/deploy.js +5 -5
  142. package/build/error/deploy.js.map +1 -1
  143. package/build/error/upgrade.d.ts +5 -0
  144. package/build/error/upgrade.d.ts.map +1 -0
  145. package/build/error/upgrade.js +16 -0
  146. package/build/error/upgrade.js.map +1 -0
  147. package/package.json +11 -7
  148. package/resource/package.nls.json +52 -59
  149. package/templates/core/v3Migration/csharp.app.local.yml +3 -2
  150. package/templates/core/v3Migration/csharp.app.yml +16 -7
  151. package/templates/core/v3Migration/js.ts.app.local.yml +23 -12
  152. package/templates/core/v3Migration/js.ts.app.yml +30 -14
  153. package/templates/core/v3Migration/spfx.app.yml +1 -1
  154. package/templates/fallback/common.zip +0 -0
  155. package/templates/fallback/csharp.zip +0 -0
  156. package/templates/fallback/js.zip +0 -0
  157. package/templates/fallback/ts.zip +0 -0
  158. package/templates/plugins/resource/aad/auth/V3/Bot/SSO/SsoOperations.cs +23 -8
  159. package/templates/plugins/resource/aad/auth/V3/Tab/GetUserProfile.razor +2 -1
@@ -1,4 +1,4 @@
1
- # yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json
1
+ # yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
2
2
  # Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
3
3
  # Visit https://aka.ms/teamsfx-actions for details on actions
4
4
  version: 1.0.0
@@ -75,30 +75,39 @@ deploy:
75
75
  {{#if activePlugins.fx-resource-bot}}
76
76
  {{#if isFunctionBot}}
77
77
  # Deploy your application to Azure Functions using the zip deploy feature.
78
- # For additional details, please refer to https://aka.ms/zip-deploy-to-azure-functions
78
+ # For additional details, see at https://aka.ms/zip-deploy-to-azure-functions
79
79
  - uses: azureFunctions/zipDeploy
80
80
  with:
81
81
  # deploy base folder
82
82
  artifactFolder: bin/Release/net6.0/win-x86/publish
83
- # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file.
83
+ # The resource id of the cloud resource to be deployed to.
84
+ # This key will be generated by arm/deploy action automatically.
85
+ # You can replace it with your existing Azure Resource id
86
+ # or add it to your environment variable file.
84
87
  resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-bot.functionAppResourceId]~}} }}
85
88
  {{else}}
86
89
  # Deploy your application to Azure App Service using the zip deploy feature.
87
- # For additional details, please refer to https://aka.ms/zip-deploy-to-app-services.
90
+ # For additional details, refer to https://aka.ms/zip-deploy-to-app-services.
88
91
  - uses: azureAppService/zipDeploy
89
92
  with:
90
93
  # deploy base folder
91
94
  artifactFolder: bin/Release/net6.0/win-x86/publish
92
- # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file.
95
+ # The resource id of the cloud resource to be deployed to.
96
+ # This key will be generated by arm/deploy action automatically.
97
+ # You can replace it with your existing Azure Resource id
98
+ # or add it to your environment variable file.
93
99
  resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-bot.resourceId]~}} }}
94
100
  {{/if}}
95
101
  {{else if activePlugins.fx-resource-frontend-hosting}}
96
102
  # Deploy your application to Azure App Service using the zip deploy feature.
97
- # For additional details, please refer to https://aka.ms/zip-deploy-to-app-services.
103
+ # For additional details, refer to https://aka.ms/zip-deploy-to-app-services.
98
104
  - uses: azureAppService/zipDeploy
99
105
  with:
100
106
  # deploy base folder
101
107
  artifactFolder: bin/Release/net6.0/win-x86/publish
102
- # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file.
108
+ # The resource id of the cloud resource to be deployed to.
109
+ # This key will be generated by arm/deploy action automatically.
110
+ # You can replace it with your existing Azure Resource id
111
+ # or add it to your environment variable file.
103
112
  resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-frontend-hosting.resourceId]~}} }}
104
113
  {{/if}}
@@ -1,4 +1,4 @@
1
- # yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json
1
+ # yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
2
2
  # Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
3
3
  # Visit https://aka.ms/teamsfx-actions for details on actions
4
4
  version: 1.0.0
@@ -39,7 +39,8 @@ provision:
39
39
  botId: BOT_ID
40
40
  botPassword: SECRET_BOT_PASSWORD
41
41
 
42
- - uses: botFramework/create # Create or update the bot registration on dev.botframework.com
42
+ # Create or update the bot registration on dev.botframework.com
43
+ - uses: botFramework/create
43
44
  with:
44
45
  botId: $\{{BOT_ID}}
45
46
  name: $\{{CONFIG__MANIFEST__APPNAME__SHORT}}-bot
@@ -150,7 +151,8 @@ deploy:
150
151
 
151
152
  {{/dotnetCommand}}
152
153
  {{#tab}}
153
- - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables
154
+ # Generate runtime environment variables
155
+ - uses: file/createOrUpdateEnvironmentFile
154
156
  with:
155
157
  target: ./tabs/.env.teamsfx.local
156
158
  envs:
@@ -162,7 +164,8 @@ deploy:
162
164
 
163
165
  {{/tab}}
164
166
  {{#if bot}}
165
- - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables
167
+ # Generate runtime environment variables
168
+ - uses: file/createOrUpdateEnvironmentFile
166
169
  with:
167
170
  target: ./bot/.env.teamsfx.local
168
171
  envs:
@@ -171,7 +174,8 @@ deploy:
171
174
 
172
175
  {{/if}}
173
176
  {{#ssoTab}}
174
- - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables
177
+ # Generate runtime environment variables
178
+ - uses: file/createOrUpdateEnvironmentFile
175
179
  with:
176
180
  target: ./tabs/.env.teamsfx.local
177
181
  envs:
@@ -184,7 +188,8 @@ deploy:
184
188
 
185
189
  {{/ssoTab}}
186
190
  {{#if ssoBot}}
187
- - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables
191
+ # Generate runtime environment variables
192
+ - uses: file/createOrUpdateEnvironmentFile
188
193
  with:
189
194
  target: ./bot/.env.teamsfx.local
190
195
  envs:
@@ -204,7 +209,8 @@ deploy:
204
209
 
205
210
  {{/if}}
206
211
  {{#if ssoFunction}}
207
- - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables
212
+ # Generate runtime environment variables
213
+ - uses: file/createOrUpdateEnvironmentFile
208
214
  with:
209
215
  target: ./api/.env.teamsfx.local
210
216
  envs:
@@ -216,7 +222,8 @@ deploy:
216
222
 
217
223
  {{/if}}
218
224
  {{#npmCommands}}
219
- - uses: cli/runNpmCommand # Run npm command
225
+ # Run npm command
226
+ - uses: cli/runNpmCommand
220
227
  with:
221
228
  args: {{args}}
222
229
  {{#if workingDirectory}}
@@ -225,7 +232,8 @@ deploy:
225
232
 
226
233
  {{/npmCommands}}
227
234
  {{#frontendStart}}
228
- - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables
235
+ # Generate runtime environment variables
236
+ - uses: file/createOrUpdateEnvironmentFile
229
237
  with:
230
238
  target: ./tabs/.localConfigs
231
239
  envs:
@@ -246,7 +254,8 @@ deploy:
246
254
 
247
255
  {{/frontendStart}}
248
256
  {{#authStart}}
249
- - uses: file/createOrUpdateJsonFile # Generate runtime environment variables
257
+ # Generate runtime appsettings to JSON file
258
+ - uses: file/createOrUpdateJsonFile
250
259
  with:
251
260
  target: {{appsettingsPath}}
252
261
  appsettings:
@@ -261,7 +270,8 @@ deploy:
261
270
 
262
271
  {{/authStart}}
263
272
  {{#botStart}}
264
- - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables
273
+ # Generate runtime environment variables
274
+ - uses: file/createOrUpdateEnvironmentFile
265
275
  with:
266
276
  target: ./bot/.localConfigs
267
277
  envs:
@@ -285,7 +295,8 @@ deploy:
285
295
 
286
296
  {{/botStart}}
287
297
  {{#if backendStart}}
288
- - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables
298
+ # Generate runtime environment variables
299
+ - uses: file/createOrUpdateEnvironmentFile
289
300
  with:
290
301
  target: ./api/.localConfigs
291
302
  envs:
@@ -1,4 +1,4 @@
1
- # yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json
1
+ # yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
2
2
  # Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
3
3
  # Visit https://aka.ms/teamsfx-actions for details on actions
4
4
  version: 1.0.0
@@ -89,12 +89,14 @@ provision:
89
89
  # Triggered when 'teamsfx deploy' is executed
90
90
  deploy:
91
91
  {{#if activePlugins.fx-resource-frontend-hosting}}
92
- - uses: cli/runNpmCommand # Run npm command
92
+ # Run npm command
93
+ - uses: cli/runNpmCommand
93
94
  name: install tab dependencies
94
95
  with:
95
96
  workingDirectory: tabs
96
97
  args: install
97
- - uses: cli/runNpmCommand # Run npm command
98
+ # Run npm command
99
+ - uses: cli/runNpmCommand
98
100
  name: build tab app
99
101
  {{#if activePlugins.fx-resource-aad-app-for-teams}}
100
102
  env:
@@ -114,7 +116,10 @@ deploy:
114
116
  workingDirectory: tabs
115
117
  # Deploy base folder. This folder includes manifest files for AAD app and Teams app that should be ignored using the ignoreFile.
116
118
  artifactFolder: build
117
- # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file.
119
+ # The resource id of the cloud resource to be deployed to.
120
+ # This key will be generated by arm/deploy action automatically.
121
+ # You can replace it with your existing Azure Resource id
122
+ # or add it to your environment variable file.
118
123
  resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-frontend-hosting.storageResourceId]~}} }}
119
124
  {{/if}}
120
125
  {{#if activePlugins.fx-resource-bot}}
@@ -132,37 +137,45 @@ deploy:
132
137
  args: run build --if-present
133
138
  {{/if}}
134
139
  # Deploy your application to Azure Functions using the zip deploy feature.
135
- # For additional details, please refer to https://aka.ms/zip-deploy-to-azure-functions
140
+ # For additional details, see at https://aka.ms/zip-deploy-to-azure-functions
136
141
  - uses: azureFunctions/zipDeploy
137
142
  with:
138
143
  workingDirectory: bot
139
144
  # Deploy base folder
140
145
  artifactFolder: .
141
- # Can be changed to any ignore file location, leave blank will ignore nothing
146
+ # Ignore file location, leave blank will ignore nothing
142
147
  ignoreFile: .funcignore
143
- # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file.
148
+ # The resource id of the cloud resource to be deployed to.
149
+ # This key will be generated by arm/deploy action automatically.
150
+ # You can replace it with your existing Azure Resource id
151
+ # or add it to your environment variable file.
144
152
  resourceId: $\{{ {{~botResourceId~}} }}
145
153
  {{else}}
146
- - uses: cli/runNpmCommand # Run npm command
154
+ # Run npm command
155
+ - uses: cli/runNpmCommand
147
156
  name: install bot dependencies
148
157
  with:
149
158
  workingDirectory: bot
150
159
  args: install
151
160
  {{#if isTypescript}}
152
- - uses: cli/runNpmCommand # Run npm command
161
+ # Run npm command
162
+ - uses: cli/runNpmCommand
153
163
  name: build bot app
154
164
  with:
155
165
  workingDirectory: bot
156
166
  args: run build --if-present
157
167
  {{/if}}
158
168
  # Deploy your application to Azure App Service using the zip deploy feature.
159
- # For additional details, please refer to https://aka.ms/zip-deploy-to-app-services.
169
+ # For additional details, refer to https://aka.ms/zip-deploy-to-app-services.
160
170
  - uses: azureAppService/zipDeploy
161
171
  with:
162
172
  workingDirectory: bot
163
173
  # Deploy base folder.
164
174
  artifactFolder: .
165
- # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file.
175
+ # The resource id of the cloud resource to be deployed to.
176
+ # This key will be generated by arm/deploy action automatically.
177
+ # You can replace it with your existing Azure Resource id
178
+ # or add it to your environment variable file.
166
179
  resourceId: $\{{ {{~botResourceId~}} }}
167
180
  {{/if}}
168
181
  {{/if}}
@@ -193,15 +206,18 @@ deploy:
193
206
  args: run build --if-present
194
207
  {{/if}}
195
208
  # Deploy your application to Azure Functions using the zip deploy feature.
196
- # For additional details, please refer to https://aka.ms/zip-deploy-to-azure-functions
209
+ # For additional details, see at https://aka.ms/zip-deploy-to-azure-functions
197
210
  - uses: azureFunctions/zipDeploy
198
211
  with:
199
212
  workingDirectory: api
200
213
  # Deploy base folder
201
214
  artifactFolder: .
202
- # Can be changed to any ignore file location, leave blank will ignore nothing
215
+ # Ignore file location, leave blank will ignore nothing
203
216
  ignoreFile: .funcignore
204
- # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file.
217
+ # The resource id of the cloud resource to be deployed to.
218
+ # This key will be generated by arm/deploy action automatically.
219
+ # You can replace it with your existing Azure Resource id
220
+ # or add it to your environment variable file.
205
221
  resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-function.functionAppResourceId]~}} }}
206
222
  {{/if}}
207
223
 
@@ -1,4 +1,4 @@
1
- # yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json
1
+ # yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
2
2
  # Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
3
3
  # Visit https://aka.ms/teamsfx-actions for details on actions
4
4
  version: 1.0.0
Binary file
Binary file
Binary file
Binary file
@@ -1,22 +1,37 @@
1
1
  using Microsoft.Bot.Builder;
2
2
  using Microsoft.Graph;
3
+ using Microsoft.Kiota.Abstractions.Authentication;
3
4
  using Microsoft.TeamsFx.Configuration;
4
5
 
5
6
  namespace {{YOUR_NAMESPACE}}.SSO;
6
7
 
8
+ public class TokenProvider : IAccessTokenProvider
9
+ {
10
+ private string token { get; set; }
11
+
12
+ public TokenProvider(String token)
13
+ {
14
+ this.token = token;
15
+ }
16
+
17
+ public Task<string> GetAuthorizationTokenAsync(Uri uri, Dictionary<string, object> additionalAuthenticationContext = default,
18
+ CancellationToken cancellationToken = default)
19
+ {
20
+ // get the token and return it
21
+ return Task.FromResult(this.token);
22
+ }
23
+
24
+ public AllowedHostsValidator AllowedHostsValidator { get; }
25
+ }
26
+
7
27
  public static class SsoOperations
8
28
  {
9
29
  public static async Task ShowUserInfo(ITurnContext stepContext, string token, BotAuthenticationOptions botAuthOptions)
10
30
  {
11
31
  await stepContext.SendActivityAsync("Retrieving user information from Microsoft Graph ...");
12
- var authProvider = new DelegateAuthenticationProvider((request) =>
13
- {
14
- request.Headers.Authorization =
15
- new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
16
- return Task.CompletedTask;
17
- });
18
- var graphClient = new GraphServiceClient(authProvider);
19
- var profile = await graphClient.Me.Request().GetAsync();
32
+ var tokenCredential = new BaseBearerTokenAuthenticationProvider(new TokenProvider(token));
33
+ var graphClient = new GraphServiceClient(tokenCredential);
34
+ var profile = await graphClient.Me.GetAsync();
20
35
  await stepContext.SendActivityAsync($"You're logged in as {profile.DisplayName}");
21
36
  }
22
37
  }
@@ -1,6 +1,7 @@
1
1
  @using System.IO
2
2
  @using Azure.Core
3
3
  @using Microsoft.Graph
4
+ @using Microsoft.Graph.Models
4
5
  @inject TeamsFx teamsfx
5
6
  @inject TeamsUserCredential teamsUserCredential
6
7
 
@@ -45,7 +46,7 @@
45
46
  IsLoading = true;
46
47
  var graph = GetGraphServiceClient();
47
48
 
48
- Profile = await graph.Me.Request().GetAsync();
49
+ Profile = await graph.Me.GetAsync();
49
50
 
50
51
  IsLoading = false;
51
52
  ErrorMessage = string.Empty;