From 95a4366edbb99aab76d8f0fd85383ab52600366a Mon Sep 17 00:00:00 2001 From: M-Patrone Date: Thu, 7 Oct 2021 01:47:50 +0200 Subject: [PATCH] replaced the set of the tenantId (#17223) Co-authored-by: Patrone Manuel --- .../workbench/services/connection/browser/connectionWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/workbench/services/connection/browser/connectionWidget.ts b/src/sql/workbench/services/connection/browser/connectionWidget.ts index b1a204a346..9c3b60bdc6 100644 --- a/src/sql/workbench/services/connection/browser/connectionWidget.ts +++ b/src/sql/workbench/services/connection/browser/connectionWidget.ts @@ -686,12 +686,12 @@ export class ConnectionWidget extends lifecycle.Disposable { } if (this.authType === AuthenticationType.AzureMFA || this.authType === AuthenticationType.AzureMFAAndUser) { + let tenantId = connectionInfo.azureTenantId; this.fillInAzureAccountOptions().then(async () => { let accountName = (this.authType === AuthenticationType.AzureMFA) ? connectionInfo.azureAccount : connectionInfo.userName; this._azureAccountDropdown.selectWithOptionName(this.getModelValue(accountName)); await this.onAzureAccountSelected(); - let tenantId = connectionInfo.azureTenantId; let account = this._azureAccountList.find(account => account.key.accountId === this._azureAccountDropdown.value); if (account && account.properties.tenants.length > 1) { let tenant = account.properties.tenants.find(tenant => tenant.id === tenantId);