Skip to content

Commit

Permalink
[#3526] Add support for MSI to JS samples and generators - authentica…
Browse files Browse the repository at this point in the history
…tion samples (#3554)

* Add MSI support to JS 18.bot-authentication

* Add MSI support to JS 24.bot-authentication-msgraph

* Add MSI support to JS 46.teams-auth

Co-authored-by: sw-joelmut <[email protected]>
  • Loading branch information
ceciliaavila and sw-joelmut authored Nov 1, 2021
1 parent cc31887 commit d69bf35
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 9 deletions.
2 changes: 2 additions & 0 deletions samples/javascript_nodejs/18.bot-authentication/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
MicrosoftAppType=
MicrosoftAppId=
MicrosoftAppPassword=
MicrosoftAppTenantId=
connectionName=
4 changes: 3 additions & 1 deletion samples/javascript_nodejs/18.bot-authentication/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ const { MainDialog } = require('./dialogs/mainDialog');

const credentialsFactory = new ConfigurationServiceClientCredentialFactory({
MicrosoftAppId: process.env.MicrosoftAppId,
MicrosoftAppPassword: process.env.MicrosoftAppPassword
MicrosoftAppPassword: process.env.MicrosoftAppPassword,
MicrosoftAppType: process.env.MicrosoftAppType,
MicrosoftAppTenantId: process.env.MicrosoftAppTenantId
});

const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory);
Expand Down
4 changes: 2 additions & 2 deletions samples/javascript_nodejs/18.bot-authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"url": "https://github.com/Microsoft/BotBuilder-Samples.git"
},
"dependencies": {
"botbuilder": "~4.14.0",
"botbuilder-dialogs": "~4.14.0",
"botbuilder": "~4.15.0-rc0",
"botbuilder-dialogs": "~4.15.0-rc0",
"dotenv": "^8.2.0",
"restify": "~8.5.1"
},
Expand Down
2 changes: 2 additions & 0 deletions samples/javascript_nodejs/24.bot-authentication-msgraph/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
MicrosoftAppType=
MicrosoftAppId=
MicrosoftAppPassword=
MicrosoftAppTenantId=
ConnectionName=
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const { MainDialog } = require('./dialogs/mainDialog');

const credentialsFactory = new ConfigurationServiceClientCredentialFactory({
MicrosoftAppId: process.env.MicrosoftAppId,
MicrosoftAppPassword: process.env.MicrosoftAppPassword
MicrosoftAppPassword: process.env.MicrosoftAppPassword,
MicrosoftAppType: process.env.MicrosoftAppType,
MicrosoftAppTenantId: process.env.MicrosoftAppTenantId
});

const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"dependencies": {
"@microsoft/microsoft-graph-client": "~2.0.0",
"botbuilder": "~4.14.0",
"botbuilder-dialogs": "~4.14.0",
"botbuilder": "~4.15.0-rc0",
"botbuilder-dialogs": "~4.15.0-rc0",
"dotenv": "^8.2.0",
"restify": "~8.5.1"
},
Expand Down
2 changes: 2 additions & 0 deletions samples/javascript_nodejs/46.teams-auth/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
MicrosoftAppType=
MicrosoftAppId=
MicrosoftAppPassword=
MicrosoftAppTenantId=
connectionName=
4 changes: 3 additions & 1 deletion samples/javascript_nodejs/46.teams-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ const { MainDialog } = require('./dialogs/mainDialog');

const credentialsFactory = new ConfigurationServiceClientCredentialFactory({
MicrosoftAppId: process.env.MicrosoftAppId,
MicrosoftAppPassword: process.env.MicrosoftAppPassword
MicrosoftAppPassword: process.env.MicrosoftAppPassword,
MicrosoftAppType: process.env.MicrosoftAppType,
MicrosoftAppTenantId: process.env.MicrosoftAppTenantId
});

const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory);
Expand Down
4 changes: 2 additions & 2 deletions samples/javascript_nodejs/46.teams-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"url": "https://github.com/Microsoft/BotBuilder-Samples.git"
},
"dependencies": {
"botbuilder": "~4.14.0",
"botbuilder-dialogs": "~4.14.0",
"botbuilder": "~4.15.0-rc0",
"botbuilder-dialogs": "~4.15.0-rc0",
"dotenv": "^8.2.0",
"restify": "~8.5.1"
},
Expand Down

0 comments on commit d69bf35

Please sign in to comment.