Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Comments

fix: allow tenantId to be specified in provisioning script#3084

Merged
cwhitten merged 4 commits intomasterfrom
benbrown/tenantid
May 15, 2020
Merged

fix: allow tenantId to be specified in provisioning script#3084
cwhitten merged 4 commits intomasterfrom
benbrown/tenantid

Conversation

@benbrown
Copy link
Contributor

Description

In provision script, use the tenantId provided by the login instead of choosing the first in the list of available tenants.

Also, allow user to specify a tenantId as a cli parameter.

Task Item

fixes #3075

@benbrown benbrown changed the title allow tenantId to be specified fix: allow tenantId to be specified in provisioning script May 15, 2020
@github-actions
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling ae182fe on benbrown/tenantid into 3a6466c on master.

const createCosmosDb = argv.createCosmosDb == 'false' ? false : true;
const createStorage = argv.createStorage == 'false' ? false : true;
const createAppInsignts = argv.createAppInsignts == 'false' ? false : true;
var tenantId = argv.tenantId ? argv.tenantId : '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const here and maybe we can do the || instead of ternary

// the returned access token will almost surely have a tenantId.
// use this as the default if one isn't specified.
// otherwise, fetch a list and use the first, but print available options.
if (token.tenantId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe token && token.tenantId?

@cwhitten
Copy link
Member

taking this now to kick a build off (0.0.4)

@cwhitten cwhitten merged commit bbd8808 into master May 15, 2020
@cwhitten cwhitten deleted the benbrown/tenantid branch May 15, 2020 17:44
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…#3084)

* allow tenantId to be specified

* use default tenantid

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants