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
This commit is contained in:
Lewis Sanchez
2022-04-05 13:14:06 -07:00
committed by GitHub
parent c707911800
commit a6000aef67

View File

@@ -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));