@microsoft/teamsfx-core 1.7.0 → 1.7.1-alpha.8d048e1f1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/constants.d.ts +1 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +1 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -1
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/telemetry.d.ts +9 -0
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +9 -0
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts +1 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +6 -5
- package/build/common/tools.js.map +1 -1
- package/build/core/FxCore.d.ts +2 -2
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +49 -11
- package/build/core/FxCore.js.map +1 -1
- package/build/core/environment.d.ts +1 -1
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +6 -1
- package/build/core/environment.js.map +1 -1
- package/build/core/error.d.ts +1 -0
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +5 -1
- package/build/core/error.js.map +1 -1
- package/build/core/middleware/aadManifestMigration.d.ts +3 -0
- package/build/core/middleware/aadManifestMigration.d.ts.map +1 -0
- package/build/core/middleware/aadManifestMigration.js +211 -0
- package/build/core/middleware/aadManifestMigration.js.map +1 -0
- package/build/core/middleware/consolidateLocalRemote.d.ts +2 -0
- package/build/core/middleware/consolidateLocalRemote.d.ts.map +1 -1
- package/build/core/middleware/consolidateLocalRemote.js +80 -51
- package/build/core/middleware/consolidateLocalRemote.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +11 -2
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/question.d.ts +3 -1
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +22 -2
- package/build/core/question.js.map +1 -1
- package/build/plugins/resource/aad/plugin.d.ts +1 -0
- package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
- package/build/plugins/resource/aad/plugin.js +54 -1
- package/build/plugins/resource/aad/plugin.js.map +1 -1
- package/build/plugins/resource/aad/utils/configs.d.ts.map +1 -1
- package/build/plugins/resource/aad/utils/configs.js +4 -1
- package/build/plugins/resource/aad/utils/configs.js.map +1 -1
- package/build/plugins/resource/apiconnector/checker.d.ts +2 -0
- package/build/plugins/resource/apiconnector/checker.d.ts.map +1 -0
- package/build/plugins/resource/apiconnector/checker.js +22 -0
- package/build/plugins/resource/apiconnector/checker.js.map +1 -0
- package/build/plugins/resource/apiconnector/config.d.ts +20 -0
- package/build/plugins/resource/apiconnector/config.d.ts.map +1 -0
- package/build/plugins/resource/apiconnector/config.js +5 -0
- package/build/plugins/resource/apiconnector/config.js.map +1 -0
- package/build/plugins/resource/apiconnector/constants.d.ts +15 -0
- package/build/plugins/resource/apiconnector/constants.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/constants.js +17 -1
- package/build/plugins/resource/apiconnector/constants.js.map +1 -1
- package/build/plugins/resource/apiconnector/depsHandler.d.ts +12 -0
- package/build/plugins/resource/apiconnector/depsHandler.d.ts.map +1 -0
- package/build/plugins/resource/apiconnector/depsHandler.js +66 -0
- package/build/plugins/resource/apiconnector/depsHandler.js.map +1 -0
- package/build/plugins/resource/apiconnector/envHandler.d.ts +2 -2
- package/build/plugins/resource/apiconnector/envHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/envHandler.js +18 -24
- package/build/plugins/resource/apiconnector/envHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/errors.d.ts +13 -1
- package/build/plugins/resource/apiconnector/errors.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/errors.js +19 -7
- package/build/plugins/resource/apiconnector/errors.js.map +1 -1
- package/build/plugins/resource/apiconnector/index.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/index.js +1 -8
- package/build/plugins/resource/apiconnector/index.js.map +1 -1
- package/build/plugins/resource/apiconnector/plugin.d.ts +11 -2
- package/build/plugins/resource/apiconnector/plugin.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/plugin.js +179 -17
- package/build/plugins/resource/apiconnector/plugin.js.map +1 -1
- package/build/plugins/resource/apiconnector/questions.d.ts +23 -3
- package/build/plugins/resource/apiconnector/questions.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/questions.js +69 -22
- package/build/plugins/resource/apiconnector/questions.js.map +1 -1
- package/build/plugins/resource/apiconnector/result.d.ts +2 -1
- package/build/plugins/resource/apiconnector/result.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/result.js.map +1 -1
- package/build/plugins/resource/apiconnector/sampleHandler.d.ts +1 -1
- package/build/plugins/resource/apiconnector/sampleHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/utils.d.ts +16 -20
- package/build/plugins/resource/apiconnector/utils.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/utils.js +72 -16
- package/build/plugins/resource/apiconnector/utils.js.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.js +6 -5
- package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
- package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/manifestTemplate.js +3 -3
- package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/v3/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v3/plugin.js +5 -0
- package/build/plugins/resource/appstudio/v3/plugin.js.map +1 -1
- package/build/plugins/resource/bot/azureOps.d.ts +0 -1
- package/build/plugins/resource/bot/azureOps.d.ts.map +1 -1
- package/build/plugins/resource/bot/azureOps.js +0 -28
- package/build/plugins/resource/bot/azureOps.js.map +1 -1
- package/build/plugins/resource/bot/clientFactory.d.ts +0 -5
- package/build/plugins/resource/bot/clientFactory.d.ts.map +1 -1
- package/build/plugins/resource/bot/clientFactory.js +1 -29
- package/build/plugins/resource/bot/clientFactory.js.map +1 -1
- package/build/plugins/resource/bot/constants.d.ts +0 -8
- package/build/plugins/resource/bot/constants.d.ts.map +1 -1
- package/build/plugins/resource/bot/constants.js +0 -8
- package/build/plugins/resource/bot/constants.js.map +1 -1
- package/build/plugins/resource/bot/errors.d.ts +0 -18
- package/build/plugins/resource/bot/errors.d.ts.map +1 -1
- package/build/plugins/resource/bot/errors.js +1 -38
- package/build/plugins/resource/bot/errors.js.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js +10 -4
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/plugin.js +2 -6
- package/build/plugins/resource/bot/functionsHostedBot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.js +4 -1
- package/build/plugins/resource/bot/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/resources/templateInfo.js +1 -1
- package/build/plugins/resource/frontend/resources/templateInfo.js.map +1 -1
- package/build/plugins/resource/sql/errors.d.ts.map +1 -1
- package/build/plugins/resource/sql/errors.js +29 -29
- package/build/plugins/resource/sql/errors.js.map +1 -1
- package/build/plugins/resource/sql/sqlClient.d.ts.map +1 -1
- package/build/plugins/resource/sql/sqlClient.js +2 -8
- package/build/plugins/resource/sql/sqlClient.js.map +1 -1
- package/build/plugins/solution/fx-solution/constants.d.ts +16 -2
- package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/constants.js +19 -1
- package/build/plugins/solution/fx-solution/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js +0 -26
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/question.d.ts +3 -1
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +21 -7
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.js +14 -5
- package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +2 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +121 -82
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +31 -22
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.js +17 -6
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/package.json +3 -3
- package/resource/package.nls.json +91 -39
- package/resource/unify-config-change-logs.md +15 -0
- package/templates/core/README.md +1 -0
- package/templates/fallback/blazor-base.csharp.default.zip +0 -0
- package/templates/fallback/bot.csharp.default.zip +0 -0
- package/templates/fallback/bot.js.command-and-response.zip +0 -0
- package/templates/fallback/bot.js.default.zip +0 -0
- package/templates/fallback/bot.js.notification-function-base.zip +0 -0
- package/templates/fallback/bot.js.notification-restify.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.command-and-response.zip +0 -0
- package/templates/fallback/bot.ts.default.zip +0 -0
- package/templates/fallback/bot.ts.notification-function-base.zip +0 -0
- package/templates/fallback/bot.ts.notification-restify.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.notification.zip +0 -0
- package/templates/fallback/function-base.js.default.zip +0 -0
- package/templates/fallback/function-base.ts.default.zip +0 -0
- package/templates/fallback/function-triggers.js.HTTPTrigger.zip +0 -0
- package/templates/fallback/function-triggers.ts.HTTPTrigger.zip +0 -0
- package/templates/fallback/tab.csharp.default.zip +0 -0
- package/templates/fallback/tab.js.default.zip +0 -0
- package/templates/fallback/tab.js.m365.zip +0 -0
- package/templates/fallback/tab.js.non-sso.zip +0 -0
- package/templates/fallback/tab.ts.default.zip +0 -0
- package/templates/fallback/tab.ts.m365.zip +0 -0
- package/templates/fallback/tab.ts.non-sso.zip +0 -0
- package/templates/plugins/resource/aad/auth/bot/README.md +63 -0
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +65 -0
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-start.html +177 -0
- package/templates/plugins/resource/aad/auth/bot/js/sso/showUserInfo.js +19 -0
- package/templates/plugins/resource/aad/auth/bot/js/sso/ssoDialog.js +173 -0
- package/templates/plugins/resource/aad/auth/bot/js/sso/teamsSsoBot.js +55 -0
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +65 -0
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-start.html +177 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/showUserInfo.ts +24 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/ssoDialog.ts +182 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/teamsSsoBot.ts +69 -0
- package/templates/plugins/resource/aad/auth/tab/README.md +49 -0
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +58 -0
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +57 -0
- package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +34 -0
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +58 -0
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +57 -0
- package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +34 -0
- package/templates/plugins/resource/aad/manifest/aad.template.json +1 -14
- package/templates/plugins/resource/apiconnector/package.json +6 -0
- package/templates/plugins/resource/bot/bicep/botProvision.template.bicep +9 -0
- package/templates/plugins/resource/bot/bicep/funcHostedBotProvision.template.bicep +2 -0
- package/templates/plugins/resource/function/bicep/functionProvision.template.bicep +2 -0
- package/templates/plugins/resource/simpleauth/bicep/simpleAuthProvision.template.bicep +4 -0
- package/templates/plugins/resource/webapp/bicep/webappProvision.template.bicep +2 -0
- package/templates/core/README-auto-generated.md +0 -31
- package/templates/fallback/bot-msgext.csharp.default.zip +0 -0
- package/templates/fallback/bot-msgext.js.default.zip +0 -0
- package/templates/fallback/bot-msgext.ts.default.zip +0 -0
- package/templates/fallback/msgext.js.default.zip +0 -0
- package/templates/fallback/msgext.ts.default.zip +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<!--This file is added by us when enable SSO. Developers can use it directly, or reference this sample to create their own auth end page.-->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
|
|
5
|
+
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>Login End Page</title>
|
|
9
|
+
<meta charset="utf-8" />
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<script
|
|
14
|
+
src="https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js"
|
|
15
|
+
integrity="sha384-mhp2E+BLMiZLe7rDIzj19WjgXJeI32NkPvrvvZBrMi5IvWup/1NUfS5xuYN5S3VT"
|
|
16
|
+
crossorigin="anonymous"
|
|
17
|
+
></script>
|
|
18
|
+
<script
|
|
19
|
+
type="text/javascript"
|
|
20
|
+
src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"
|
|
21
|
+
integrity="sha384-s/NxjjAgw1QgpDhOlVjTceLl4axrp5nqpUbCPOEQy1PqbFit9On6uw2XmEF1eq0s"
|
|
22
|
+
crossorigin="anonymous">
|
|
23
|
+
</script>
|
|
24
|
+
<script type="text/javascript">
|
|
25
|
+
var currentURL = new URL(window.location);
|
|
26
|
+
var clientId = currentURL.searchParams.get("clientId");
|
|
27
|
+
|
|
28
|
+
microsoftTeams.initialize();
|
|
29
|
+
microsoftTeams.getContext(async function (context) {
|
|
30
|
+
const msalConfig = {
|
|
31
|
+
auth: {
|
|
32
|
+
clientId: clientId,
|
|
33
|
+
authority: `https://login.microsoftonline.com/${context.tid}`,
|
|
34
|
+
navigateToLoginRequestUrl: false
|
|
35
|
+
},
|
|
36
|
+
cache: {
|
|
37
|
+
cacheLocation: "sessionStorage",
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const msalInstance = new window.msal.PublicClientApplication(msalConfig);
|
|
42
|
+
msalInstance.handleRedirectPromise()
|
|
43
|
+
.then((tokenResponse) => {
|
|
44
|
+
if (tokenResponse !== null) {
|
|
45
|
+
microsoftTeams.authentication.notifySuccess(JSON.stringify({
|
|
46
|
+
sessionStorage: sessionStorage
|
|
47
|
+
}));
|
|
48
|
+
} else {
|
|
49
|
+
microsoftTeams.authentication.notifyFailure("Get empty response.");
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
.catch((error) => {
|
|
53
|
+
microsoftTeams.authentication.notifyFailure(error);
|
|
54
|
+
});
|
|
55
|
+
})
|
|
56
|
+
</script>
|
|
57
|
+
</body>
|
|
58
|
+
</html>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!--This file is added by us when enable SSO. Developers can use it directly, or reference this sample to create their own auth end page.-->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
|
|
5
|
+
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>Login Start Page</title>
|
|
9
|
+
<meta charset="utf-8" />
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<script
|
|
14
|
+
src="https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js"
|
|
15
|
+
integrity="sha384-mhp2E+BLMiZLe7rDIzj19WjgXJeI32NkPvrvvZBrMi5IvWup/1NUfS5xuYN5S3VT"
|
|
16
|
+
crossorigin="anonymous"
|
|
17
|
+
></script>
|
|
18
|
+
<script
|
|
19
|
+
type="text/javascript"
|
|
20
|
+
src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"
|
|
21
|
+
integrity="sha384-s/NxjjAgw1QgpDhOlVjTceLl4axrp5nqpUbCPOEQy1PqbFit9On6uw2XmEF1eq0s"
|
|
22
|
+
crossorigin="anonymous">
|
|
23
|
+
</script>
|
|
24
|
+
<script type="text/javascript">
|
|
25
|
+
microsoftTeams.initialize();
|
|
26
|
+
|
|
27
|
+
// Get the tab context, and use the information to navigate to Azure AD login page
|
|
28
|
+
microsoftTeams.getContext(async function (context) {
|
|
29
|
+
// Generate random state string and store it, so we can verify it in the callback
|
|
30
|
+
var currentURL = new URL(window.location);
|
|
31
|
+
var clientId = currentURL.searchParams.get("clientId");
|
|
32
|
+
var scope = currentURL.searchParams.get("scope");
|
|
33
|
+
var loginHint = currentURL.searchParams.get("loginHint");
|
|
34
|
+
|
|
35
|
+
const msalConfig = {
|
|
36
|
+
auth: {
|
|
37
|
+
clientId: clientId,
|
|
38
|
+
authority: `https://login.microsoftonline.com/${context.tid}`,
|
|
39
|
+
navigateToLoginRequestUrl: false
|
|
40
|
+
},
|
|
41
|
+
cache: {
|
|
42
|
+
cacheLocation: "sessionStorage",
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const msalInstance = new msal.PublicClientApplication(msalConfig);
|
|
47
|
+
const scopesArray = scope.split(" ");
|
|
48
|
+
const scopesRequest = {
|
|
49
|
+
scopes: scopesArray,
|
|
50
|
+
redirectUri: window.location.origin + `/auth-end.html?clientId=${clientId}`,
|
|
51
|
+
loginHint: loginHint
|
|
52
|
+
};
|
|
53
|
+
await msalInstance.loginRedirect(scopesRequest);
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Button } from "@fluentui/react-northstar";
|
|
2
|
+
import { useGraph, useTeamsFx } from "@microsoft/teamsfx-react";
|
|
3
|
+
|
|
4
|
+
export function GetUserProfile() {
|
|
5
|
+
const { teamsfx } = useTeamsFx();
|
|
6
|
+
const { loading, error, data, reload } = useGraph(
|
|
7
|
+
async (graph, teamsfx, scope) => {
|
|
8
|
+
// Call graph api directly to get user profile information
|
|
9
|
+
const profile = await graph.api("/me").get();
|
|
10
|
+
|
|
11
|
+
let photoUrl = "";
|
|
12
|
+
try {
|
|
13
|
+
const photo = await graph.api("/me/photo/$value").get();
|
|
14
|
+
photoUrl = URL.createObjectURL(photo);
|
|
15
|
+
} catch {
|
|
16
|
+
// Could not fetch photo from user's profile, return empty string as placeholder.
|
|
17
|
+
}
|
|
18
|
+
return { profile, photoUrl };
|
|
19
|
+
},
|
|
20
|
+
{ scope: ["User.Read"], teamsfx: teamsfx }
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
<h2>GetUserProfile</h2>
|
|
26
|
+
<p>Click below to authorize button to grant permission to using Microsoft Graph.</p>
|
|
27
|
+
<Button primary content="Authorize" disabled={loading} onClick={reload} />
|
|
28
|
+
{!loading && error && (
|
|
29
|
+
<div className="error">Failed to read your profile. Please try again later.</div>
|
|
30
|
+
)}
|
|
31
|
+
{!loading && data && <div>Hello {data.profile.displayName}</div>}
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -92,18 +92,5 @@
|
|
|
92
92
|
"identifierUris": [
|
|
93
93
|
"{{state.fx-resource-aad-app-for-teams.applicationIdUris}}"
|
|
94
94
|
],
|
|
95
|
-
"replyUrlsWithType": [
|
|
96
|
-
{
|
|
97
|
-
"url": "{{state.fx-resource-frontend-hosting.endpoint}}/auth-end.html",
|
|
98
|
-
"type": "Web"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"url": "{{state.fx-resource-frontend-hosting.endpoint}}/auth-end.html?clientId={{state.fx-resource-aad-app-for-teams.clientId}}",
|
|
102
|
-
"type": "Spa"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"url": "{{state.fx-resource-frontend-hosting.endpoint}}/blank-auth-end.html",
|
|
106
|
-
"type": "Spa"
|
|
107
|
-
}
|
|
108
|
-
]
|
|
95
|
+
"replyUrlsWithType": []
|
|
109
96
|
}
|
|
@@ -8,7 +8,11 @@ var botServiceName = contains(provisionParameters, 'botServiceName') ? provision
|
|
|
8
8
|
var botServiceSku = contains(provisionParameters, 'botServiceSku') ? provisionParameters['botServiceSku'] : 'F0' // Try to read SKU for Azure Bot Service from parameters
|
|
9
9
|
var botDisplayName = contains(provisionParameters, 'botDisplayName') ? provisionParameters['botDisplayName'] : '${resourceBaseName}' // Try to read display name for Azure Bot Service from parameters
|
|
10
10
|
var serverfarmsName = contains(provisionParameters, 'botServerfarmsName') ? provisionParameters['botServerfarmsName'] : '${resourceBaseName}bot' // Try to read name for App Service Plan from parameters
|
|
11
|
+
{{#if enableAlwaysOn}}
|
|
12
|
+
var webAppSKU = contains(provisionParameters, 'botWebAppSKU') ? provisionParameters['botWebAppSKU'] : 'B1' // Try to read SKU for Azure Web App from parameters
|
|
13
|
+
{{else}}
|
|
11
14
|
var webAppSKU = contains(provisionParameters, 'botWebAppSKU') ? provisionParameters['botWebAppSKU'] : 'F1' // Try to read SKU for Azure Web App from parameters
|
|
15
|
+
{{/if}}
|
|
12
16
|
var webAppName = contains(provisionParameters, 'botSitesName') ? provisionParameters['botSitesName'] : '${resourceBaseName}bot' // Try to read name for Azure Web App from parameters
|
|
13
17
|
|
|
14
18
|
// Register your web service as a bot with the Bot Framework
|
|
@@ -54,7 +58,11 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
54
58
|
properties: {
|
|
55
59
|
serverFarmId: serverfarm.id
|
|
56
60
|
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
61
|
+
httpsOnly: true
|
|
57
62
|
siteConfig: {
|
|
63
|
+
{{#if enableAlwaysOn}}
|
|
64
|
+
alwaysOn: true
|
|
65
|
+
{{/if}}
|
|
58
66
|
appSettings: [
|
|
59
67
|
{
|
|
60
68
|
name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
|
|
@@ -69,6 +77,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
69
77
|
value: '1'
|
|
70
78
|
}
|
|
71
79
|
]
|
|
80
|
+
ftpsState: 'FtpsOnly'
|
|
72
81
|
}
|
|
73
82
|
}
|
|
74
83
|
identity: {
|
|
@@ -56,6 +56,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
56
56
|
properties: {
|
|
57
57
|
serverFarmId: serverfarm.id
|
|
58
58
|
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
59
|
+
httpsOnly: true
|
|
59
60
|
siteConfig: {
|
|
60
61
|
alwaysOn: true
|
|
61
62
|
appSettings: [
|
|
@@ -96,6 +97,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
96
97
|
value: '1' // Zipdeploy files will always be updated. Detail: https://aka.ms/teamsfx-zipdeploy-donot-preserve-filetime
|
|
97
98
|
}
|
|
98
99
|
]
|
|
100
|
+
ftpsState: 'FtpsOnly'
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
identity: {
|
|
@@ -27,6 +27,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
27
27
|
properties: {
|
|
28
28
|
serverFarmId: serverfarms.id
|
|
29
29
|
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
30
|
+
httpsOnly: true
|
|
30
31
|
siteConfig: {
|
|
31
32
|
appSettings: [
|
|
32
33
|
{
|
|
@@ -58,6 +59,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
58
59
|
value: '~14' // Set NodeJS version to 14.x
|
|
59
60
|
}
|
|
60
61
|
]
|
|
62
|
+
ftpsState: 'FtpsOnly'
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
identity: {
|
|
@@ -25,6 +25,10 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
25
25
|
properties: {
|
|
26
26
|
serverFarmId: serverFarms.id
|
|
27
27
|
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
28
|
+
httpsOnly: true
|
|
29
|
+
siteConfig:{
|
|
30
|
+
ftpsState: 'FtpsOnly'
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
identity: {
|
|
30
34
|
type: 'UserAssigned'
|
|
@@ -23,6 +23,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
23
23
|
properties: {
|
|
24
24
|
serverFarmId: serverFarms.id
|
|
25
25
|
keyVaultReferenceIdentity: userAssignedIdentityId
|
|
26
|
+
httpsOnly: true
|
|
26
27
|
siteConfig: {
|
|
27
28
|
appSettings: [
|
|
28
29
|
{
|
|
@@ -30,6 +31,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
30
31
|
value: '1'
|
|
31
32
|
}
|
|
32
33
|
]
|
|
34
|
+
ftpsState: 'FtpsOnly'
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
identity: {
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# TeamsFx Project
|
|
2
|
-
|
|
3
|
-
## Take a tour of your app source code
|
|
4
|
-
|
|
5
|
-
After initializing the project, you can view the project folders and files in the Explorer area of Visual Studio Code after the Teams Toolkit registers and configures your app. The following table lists all the scaffolded folder and files by Teams Toolkit:
|
|
6
|
-
|
|
7
|
-
| File name | Contents |
|
|
8
|
-
|- | -|
|
|
9
|
-
|`.fx/configs/config.local.json`| Configuration file for local environment |
|
|
10
|
-
|`.fx/configs/config.dev.json`| Configuration file for dev environment |
|
|
11
|
-
|`.fx/configs/projectSettings.json`| Global project settings, which apply to all environments |
|
|
12
|
-
|`templates/appPackage/manifest.template.json`|Teams app manifest template|
|
|
13
|
-
|`templates/appPackage/resources`|Teams app's icon referenced by manifest template|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## Add components
|
|
17
|
-
|
|
18
|
-
Now you're able to add components with Teams Toolkit to build Teams app for below scenarios.
|
|
19
|
-
|
|
20
|
-
### Scenario 1: Send Notification to Teams
|
|
21
|
-
|
|
22
|
-
Sending a message in response to stimulus tasks through conversations. Please refer to [our wiki](https://github.com/OfficeDev/TeamsFx/wiki/Incremental-Build#scenario-1-send-notification-to-teams) for instructions.
|
|
23
|
-
|
|
24
|
-
### Scenario 2: Build Command And Response
|
|
25
|
-
|
|
26
|
-
Running simple and repetitive automated tasks through conversations. Please refer to [our wiki](https://github.com/OfficeDev/TeamsFx/wiki/Incremental-Build#scenario-2-build-command-and-response) for instructions.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### Scenario 3: Embed your existing web pages in Teams
|
|
30
|
-
|
|
31
|
-
Integrate with your existing web page application to build a Teams app. Please refer to [our wiki](https://github.com/OfficeDev/TeamsFx/wiki/Incremental-Build#scenario-3-embed-your-existing-web-pages-in-teams) for instructions.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|