From a6000aef677c9677a5d98ef3c7ebab32578b2227 Mon Sep 17 00:00:00 2001 From: Lewis Sanchez <87730006+lewis-sanchez@users.noreply.github.com> Date: Tue, 5 Apr 2022 13:14:06 -0700 Subject: [PATCH] Resolves undefined tenant error while adding an account. (#18937) * Selects the first tenant that appears in the drop down list of tenants * Fixes tenant undefined while adding account error --- .../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 43ac51e68a..eb3bddffb5 100644 --- a/src/sql/workbench/services/connection/browser/connectionWidget.ts +++ b/src/sql/workbench/services/connection/browser/connectionWidget.ts @@ -686,8 +686,8 @@ export class ConnectionWidget extends lifecycle.Disposable { } if (this.authType === AuthenticationType.AzureMFA || this.authType === AuthenticationType.AzureMFAAndUser) { - let tenantId = connectionInfo.azureTenantId; this.fillInAzureAccountOptions().then(async () => { + let tenantId = connectionInfo.azureTenantId; let accountName = (this.authType === AuthenticationType.AzureMFA) ? connectionInfo.azureAccount : connectionInfo.userName; this._azureAccountDropdown.selectWithOptionName(this.getModelValue(accountName));